{"repo":"nil-go/konf","free":true,"listed":false,"github":"https://github.com/nil-go/konf","clone":"git clone https://github.com/nil-go/konf.git","description":"The simplest config loader for Go that reads/watches from file, env, flag and clouds (AWS, Azure, GCP).","language":"Go","stars":391,"topics":["configuration","go","golang","minimalist","config","config-loader","configuration-loader","configuration-file","environment-variables","flags"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"The simplest config loader for Go konf offers an(other) opinion on how Go programs can read configuration without becoming coupled to a particular configuration source. Features - konf.Unmarshal for reading configuration to any type of object. - konf.OnChange for registering callbacks while configuration changes. - konf.Explain for understanding where the configuration is loaded from. - Various providers for loading configuration from major clouds, AWS, Azure, and GCP with Notifier for notifying the changes of configuration. - Zero dependencies in core module which supports loading configuration from environment variables,flags, and embed file system. Benchmarks The following benchmarks compare the performance of konf with spf13/viper and knadh/koanf, which are inspiration of konf. Unmarshal (ns/op) Unmarshal (allocs/op) Get[^1] (ns/op) Get (allocs/op) :------ ------------------: ----------------------: ----------------: ----------------: Konf 41.09 4 16.71 1 Viper 614.8 22 104.9 3 Koanf 15949 657 7.898 1 [^1]: Comparing to Get in both Viper and Koanf only can get the primitive types, Get in Konf can get any type since it's just a wrapper of Unmarshal. So for complex struct, it only needs single Konf Get but may needs multiple Get(s) in Viper and Koanf. Usage Somewhere, early in an application's life, it will make a decision about which configuration source(s) (implementation) it actually wants to use. Something like: Outside of this early setup, no other packages need to kno","default_branch":null,"files":null,"tree":[],"storefront":"/r/nil-go","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/nil-go/konf/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}