/config

Golang Config Interface

Primary LanguageGoMIT LicenseMIT

github.com/aellwein/config

What is it?

This Go module provides a configuration file management defined by stable, versioned Cfg interface to be used across your Go files without a coupling to the actual implementation.

The Cfg interface mimics the viper interface and also uses it as its default implementation.

Implementation can be exchanged on demand without doing modification to your app's code.

Usage

The usage is very simple. Refer to example.go file to get an idea on how to use it.

Bonus

Config object can be passed via context.Context interface.

This is useful, for example, if you work with commandline parsers like spf13/cobra or urfave/cli.

License

MIT License