Casey DeLorme

gonf

I actually started with three separate configuration packages, and a package to make working with map[string]interface{} easier:

After over a year of using each, I realized that I always followed exactly the same patterns, and never leveraged maps due to the additional complexity.

So I decided to write a consolidated configuration package.

It currently provides POSIX compliant command line option support using an implementation with an explicit greedy character, environment variables, casting from string inputs to the supplied structure, loading and saving to and from a json file, and is completely concurrently safe.

I made a lot of decisions that not everyone will agree with, but for me this package solves every configuration problem I could want without importing a single third party dependency.

However, even with the tests provided, because this is still fairly new I can’t guarantee the stability just yet. Once I have used it in more projects I will be able to say for sure.

written on 2017-04-13