Golang

Managing configuration with Viper

Viper Viper is a popular configuration library that’s designed with 12 factor applications in mind. Viper is a complete configuration solution for go applications including 12 factor apps. It is designed to work within an application, and can handle all types of configuration needs and formats. Viper can be thought of as a registry for all of your applications configuration needs. Let’s use it to provide configuration for a typical application.
Read more

Stateful locks in Go

Locking serves as a construct which is used to enable writes from several threads or goroutines to the same data structures, to avoid concurrency issues. Imagine if every thread would read a value, add something to this value and then write the value back to the shared data structures - we expect in the best case to lose what we added in some routine, and we have to use a lock to avoid this.

Read more

The 12 Factors of Go

The 12 Factor App methodology is a set of best practices to follow when building modern software applications. It was created by Heroku as a guide for developers to optimize application development for their platform as a service. At the core, the 12FA methodology is a marketing document, but the concepts behind individual practices outline best practices that can be followed regardless of the platform where you publish your apps.

Read more

Golang tips and tricks, part 3

When you’re writing software it’s not so much the one liner that changes how you work, but the balancing act of programming patterns you use to build your software. I’m hoping to outline a few rules and patterns which make sense to me when building out software in Go.

Read more