aconfig
aconfig copied to clipboard
Simple, useful and opinionated config loader.
(hopefully :) Fixes #117 #120 do `aconfig.Config{NewParser: true}` to enable new structure parser.
Hello, thank you for a great library! Sometimes there is a need to pass as an ENV variable, not a single value, but a whole struct to override all the...
POC: ```go func main() { type MyConfig struct { Slice []struct { A int } `json:"slice" toml:"slice"` } var cfg MyConfig loader := aconfig.LoaderFor(&cfg, aconfig.Config{ // feel free to skip...
YAML: ``` WriteRoles: - Writer ReadRoles: - Writer - Reader ListRoles: - Writer - Reader ``` Struct: ``` type TestConfig struct { ReadRoles []Role `yaml:"ReadRoles"` WriteRoles []Role `yaml:"WriteRoles"` ListRoles []Role...
Current version is outdated https://play.golang.org/p/OsCR8qTCN0H Probably there will be another repository which will contains all the examples with external dependencies for https://github.com/cristalhq libraries, with a CI on cron
The library itself is great and powerful, but it's hard to understand all of the options and possibilities without reading the sources. Please add more readable documentation about its features...
It's not common to deprecate fields to remove them in the next release or move them to some other place. It would be nice to have support for it in...
I'm trying to find out if it's possible that aconfig is able to parse a field that has 2 different uses, a short version (string) and a long version (struct)...
The reflection process does not consider struct field tags within a slice. Therefore, the field name must match the tag name, starting with an uppercase letter. ```go func (l *Loader)...