Ecosyste.ms: Packages

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

Top 2.0% on proxy.golang.org
Top 0.6% dependent packages on proxy.golang.org
Top 0.8% dependent repos on proxy.golang.org
Top 4.3% forks on proxy.golang.org
Top 1.6% docker downloads on proxy.golang.org

proxy.golang.org : github.com/cristalhq/aconfig

Package aconfig provides simple but still powerful config loader. It can read configuration from different sources, like defaults, files, environment variables, console flag parameters. Defaults are defined in structure tags (`default` tag). For files JSON, YAML, TOML and .Env are supported. Environment variables and flag parameters can have an optional prefix to separate them from other entries. Also, aconfig is dependency-free, file decoders are used as separate modules (submodules to be exact) and are added to your go.mod only when used. Loader configuration (`Config` type) has different ways to configure loader, to skip some sources, define prefixes, fail on unknown params. Just load defaults from struct definition. Load defaults from struct definition and overwrite with a file. And then overwrite with environment variables. Load defaults from struct defunition and overwrite with a file. Load defaults from struct definition and overwrite with a file. And then overwrite with environment variables. Finally read command line flags.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/cristalhq/aconfig
Keywords: command-line, config, configuration, configuration-files, dependency-free, environment, environment-variables, go, golang, json, toml, yaml
License: MIT
Latest release: 9 months ago
First release: almost 4 years ago
Namespace: github.com/cristalhq
Dependent packages: 86
Dependent repositories: 44
Stars: 435 on GitHub
Forks: 29 on GitHub
Docker dependents: 4
Docker downloads: 253
See more repository details: repos.ecosyste.ms
Last synced: 16 days ago

    Loading...
    Readme
    Loading...