An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

github.com/segmentio/conf

Package conf package provides tools for easily loading program configurations from multiple sources such as the command line arguments, environment, or a configuration file. Most applications only need to use the Load function to get their settings loaded into an object. By default, Load will read from a configurable file defined by the -config-file command line argument, load values present in the environment, and finally load the program arguments. The object in which the configuration is loaded must be a struct, the names and types of its fields are introspected by the Load function to understand how to load the configuration. The name deduction from the struct field obeys the same rules than those implemented by the standard encoding/json package, which means the program can set the "conf" tag to override the default field names in the command line arguments and configuration file. A "help" tag may also be set on the fields of the configuration object to add documentation to the setting, which will be shown when the program is asked to print its help. When values are loaded from the environment the Load function looks for variables matching the struct fields names in snake-upper-case form.

Ecosystem
proxy.golang.org
Latest Release
v1.3.1
about 1 year ago
Versions
5
Dependent Packages
56
Dependent Repos
211
Links
Registry proxy.golang.org
Source Repository
Docs Documentation
JSON API View JSON
CodeMeta codemeta.json
Package Details
PURL pkg:golang/github.com/segmentio/conf
spec
License MIT
Namespace github.com/segmentio
First Release over 7 years ago
Last Synced 20 days ago
Repository
Stars 89 on GitHub
Forks 10 on GitHub
Docker Dependents 2
Docker Downloads 45,179
Rankings on proxy.golang.org
Overall Top 2.9%
Dependent packages Top 0.6%
Dependent repos Top 0.4%
Forks Top 6.6%
Docker downloads Top 1.8%