{"repo":"segmentio/conf","free":true,"listed":false,"github":"https://github.com/segmentio/conf","clone":"git clone https://github.com/segmentio/conf.git","description":"Go package for loading program configuration from multiple sources.","language":"Go","stars":87,"topics":["command-line","command-line-parser","configuration","configuration-file","configuration-loader","environment","environment-variables","environment-vars","golang","go"],"license":"MIT","category":"cli-tools","readme_excerpt":"conf Go package for loading program configuration from multiple sources. Motivations ----------- Loading program configurations is usually done by parsing the arguments passed to the command line, and in this case the standard library offers a good support with the flag package. However, there are times where the standard is just too limiting, for example when the program needs to load configuration from other sources (like a file, or the environment variables). The conf package was built to address these issues, here were the goals: - Loading the configuration has to be type-safe , there were other packages available that were covering the same use-cases but they often required doing type assertions on the configuration values which is always an opportunity to get the program to panic. - Keeping the API minimal , while the flag package offered the type safety we needed it is also very verbose to setup. With conf , only a single function call is needed to setup and load the entire program configuration. - Supporting richer syntaxes , because program configurations are often generated dynamically, the conf package accepts YAML values as input to all configuration values. It also has support for sub-commands on the command line, which is a common approach used by CLI tools. - Supporting multiple sources , because passing values through the command line is not always the best approach, programs may need to receive their configuration from files, environment variables, secret sto","default_branch":null,"files":null,"tree":[],"storefront":"/r/segmentio","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/segmentio/conf/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."}