DEV Community

loading...

Discussion on: A clean way to pass configs in a Go application

Collapse
chinglinwen profile image
chinglin

I've just found this package to be what I like flag first

Not that complex(like viper), still using flag( explicit ), but provide env parse and config file loading.

github.com/peterbourgon/ff

Collapse
ilyakaznacheev profile image
Ilya Kaznacheev Author

I've designed a tiny library for config management: cleanenv.

It uses regular structures with tags, which means, that you can read flags or whatever into this structure and then override it with values from config and environment (or conversely).