gcfg
koanf
Our great sponsors
gcfg | koanf | |
---|---|---|
0 | 7 | |
161 | 1,094 | |
0.0% | - | |
0.0 | 7.2 | |
about 1 year ago | 5 days ago | |
Go | Go | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
gcfg
We haven't tracked posts mentioning gcfg yet.
Tracking mentions began in Dec 2020.
koanf
-
Viper – Go Configuration with Fangs
Use viper with care. It has some dangerous fundamental flaws [1]. We got bitten hard, submitted a PR [2] and followed up for a year and a half to no avail, before I went ahead and reinvented the wheel and wrote koanf (plug), specifically to avoid viper's flaws.
Most importantly:
- Breaks JSON, YAML, TOML etc. language specs by forcibly lowercasing all keys internally. Dangerous because it can silently merge differently cased config keys into lowercase.
- Hard codes big unnecessary dependencies into the core, significantly bloating build sizes. No separation or abstraction.
-
Extracting embedded files
It's not hard to a) look for a key in an environment variable b) accept a key as a parameter c) load a key from a file d) all of the above with something like koanf
- What are some good open source project to read when learning Go?
-
Coral, a friendly Cobra fork with nearly all its features, but only 4 dependencies
Came across this the other day https://github.com/knadh/koanf as an alternative to Viper.
-
What are your favorite packages to use?
https://github.com/knadh/koanf for config management. Readme contains why it's a good alternative to viper.
-
Is Viper necessary if my app is only using environment variables?
I use Koanf, much simpeler with the same options https://github.com/knadh/koanf
-
I've been using "caarlos0/env" for nearly 4 years? Anything better?
Personally I like: https://github.com/knadh/koanf
What are some alternatives?
viper - Go configuration with fangs
config - JSON or YAML configuration wrapper with convenient access methods.
konfig - Composable, observable and performant config handling for Go for the distributed processing era
go-simple-config - open source for accessing and storing configuration
goConfig - goconfig uses a struct as input and populates the fields of this struct with parameters from command line, environment variables and configuration file.
envconfig - Small library to read your configuration from environment variables
go-ini - automatic mirror of https://git.sr.ht/~spc/go-ini
kelseyhightower/envconfig - Golang library for managing configuration data from environment variables
envcfg - Un-marshaling environment variables to Go structs
mini - A golang package for parsing ini-style configuration files