{"repo":"knadh/koanf","free":true,"listed":false,"github":"https://github.com/knadh/koanf","clone":"git clone https://github.com/knadh/koanf.git","description":"Simple, extremely lightweight, extensible, configuration management library for Go. Supports JSON, TOML, YAML, env, command line, file, S3 etc. Alternative to viper.","language":"Go","stars":4165,"topics":["configuration","configuration-management","configuration-file","golang","go","golang-package","viper","yaml","toml","s3-bucket"],"license":"MIT","category":"cli-tools","readme_excerpt":"koanf is a library for reading configuration from different sources in different formats in Go applications. It is a cleaner, lighter alternative to spf13/viper with better abstractions and extensibility and far fewer dependencies. koanf v2 has modules (Providers) for reading configuration from a variety of sources such as files, command line flags, environment variables, Vault, and S3 and for parsing (Parsers) formats such as JSON, YAML, TOML, HUML, Hashicorp HCL. It is easy to plug in custom parsers and providers. All external dependencies in providers and parsers are detached from the core and can be installed separately as necessary. Installation See the list of all bundled Providers and Parsers. Contents - Concepts - Reading config from files - Watching file for changes - Reading from command line - Reading environment variables - Reading from an S3 bucket - Reading raw bytes - Reading from maps and structs - Unmarshalling and marshalling - Order of merge and key case sensitivity - Custom Providers and Parsers - Custom merge strategies - List of installable Providers and Parsers Concepts - koanf.Provider is a generic interface that provides configuration, for example, from files, environment variables, HTTP sources, or anywhere. The configuration can either be raw bytes that a parser can parse, or it can be a nested map[string]any that can be directly loaded. - koanf.Parser is a generic interface that takes raw bytes, parses, and returns a nested map[string]any . For exa","default_branch":null,"files":null,"tree":[],"storefront":"/r/knadh","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/knadh/koanf/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."}