Enhanced Version and Build Information for your Go programs with ldflags

Enhanced Version and Build Information for your Go programs with ldflags In the previous post we show how to create a simple CLI in Go with Cobra. I received a suggestion from one of my colleagues, Andrew Block. He suggested complementing that post with the use of ldflags at build time in order to define specific information to a specific build like build time, git commit, etc. Andy is also running a blog, go check it out!...

Published on January 19, 2023 · Last updated on January 19, 2023 · 3 min · Mario

Writing CLIs in Go with Cobra

Writing CLIs in Go using Cobra A few months ago, I was working with my colleague Alberto in a CLI. The language of choice was Go and I manage to learn a thing or two. In today’s post we will see a very basic skeleton for a CLI written in Go. This will certainly help me in the future as a template for the next CLI, and maybe it helps you too!...

Published on January 15, 2023 · Last updated on January 15, 2023 · 7 min · Mario

Enabling Prometheus Metrics on your Applications

Instrumenting your Applications We usually see systems being monitored by Ops teams, in fact, there are lots of valuable metrics that help Ops teams understand how the infrastructure they are managing is doing, but when it comes to applications monitoring, we don’t see those being monitored that carefully most of the time. Sometimes that ends up in application crashes that might be prevented with a proper monitoring strategy. In this blog post we are going to see how we can instrument our applications using Prometheus metrics libraries....

Published on August 11, 2019 · Last updated on August 11, 2019 · 7 min · Mario