en | ru

Clean Configuration Management in Golang


There are many good approaches to handle configuration in a modern application. Now we use such things as configuration files, environment variables, command-line parameters, as well as CI configuration patterns and on-fly config file builds, remote config servers, specific mapping, and binding services and even more complex things.

But the target is the same - provide the app with a configuration, which is fast to get and easy to use. But how to do that?

..  »

Setup, build, automate


deploy a dockerized app to Heroku fast!

Heroku is a beautiful service. Although it doesn’t support Kubernetes or give a so bright range of cloud infrastructure options, it still does a great job by hosting small applications (even for free).

But the remote cloud configuration may be painful. It’s easy and nice until something goes wrong. It’s ok to dive into manuals and documentation, spend hours to understand how things work and so on. You are a developer after all.

..  »

What's wrong with godoc?


Like many modern languages, Golang has built-in inline documentation support tool called godoc.

To be honest, it’s awesome. It is a really great tool, that has a real impact on the everyday coding process. At least if you use plugins with function call tips as I do.

But there is the big problem of the majority Go-projects that is tightly related to godoc but lays outside of it.

The godoc is really cool. You can document your methods and packages, paste a code snippet, that will have highlighting on the web page. Some IDE plugins will give you signature tips based on function documentation, e.g. description of parameters.

..  »

Clean way to pass configs in a Go application


There are many concurrent approaches to organize application configuration nowadays.

Classic .ini files, .json, .toml, .yaml, configs, modern .env and, of course, container environment. And don’t forget about CLI arguments! Am I missing something?

Let me be honest, I really dislike any implicitness in interfaces. Same for the CLI of course. Any of your interfaces, whether public or internal, API or object interface, a class method or module facade – they have to cooperate fair. The contract between you and the other side should be explicit, rightful and without any notes in small text at the bottom of the page.

..  »