All Projects → uber-go → Config

uber-go / Config

Licence: mit
Configuration for Go applications

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Config

Yamlsettings
Yaml Settings Configuration Module
Stars: ✭ 12 (-94.98%)
Mutual labels:  yaml, configuration
Konf
A type-safe cascading configuration library for Kotlin/Java/Android, supporting most configuration formats
Stars: ✭ 225 (-5.86%)
Mutual labels:  yaml, configuration
Zaml
The Final Form of configuration files
Stars: ✭ 45 (-81.17%)
Mutual labels:  yaml, configuration
Dasel
Query, update and convert data structures from the command line. Comparable to jq/yq but supports JSON, TOML, YAML, XML and CSV with zero runtime dependencies.
Stars: ✭ 759 (+217.57%)
Mutual labels:  yaml, configuration
Fig
A minimalist Go configuration library
Stars: ✭ 142 (-40.59%)
Mutual labels:  yaml, configuration
Carvel Ytt
YAML templating tool that works on YAML structure instead of text
Stars: ✭ 816 (+241.42%)
Mutual labels:  yaml, configuration
Hiyapyco
HiYaPyCo - A Hierarchical Yaml Python Config
Stars: ✭ 58 (-75.73%)
Mutual labels:  yaml, configuration
Confuse
painless YAML config files for Python
Stars: ✭ 285 (+19.25%)
Mutual labels:  yaml, configuration
Dynaconf
Configuration Management for Python ⚙
Stars: ✭ 2,082 (+771.13%)
Mutual labels:  configuration, yaml
Night Config
Powerful java configuration library for toml, yaml, hocon, json and in-memory configurations
Stars: ✭ 93 (-61.09%)
Mutual labels:  yaml, configuration
Koanf
Light weight, extensible configuration management library for Go. Built in support for JSON, TOML, YAML, env, command line, file, S3 etc. Alternative to viper.
Stars: ✭ 450 (+88.28%)
Mutual labels:  yaml, configuration
Simple Settings
A simple way to manage your project settings.
Stars: ✭ 165 (-30.96%)
Mutual labels:  yaml, configuration
Jk
Configuration as Code with ECMAScript
Stars: ✭ 322 (+34.73%)
Mutual labels:  yaml, configuration
Strictyaml
Type-safe YAML parser and validator.
Stars: ✭ 836 (+249.79%)
Mutual labels:  yaml, configuration
Hoplite
A boilerplate-free library for loading configuration files as data classes in Kotlin
Stars: ✭ 322 (+34.73%)
Mutual labels:  yaml, configuration
Resticprofile
Configuration profiles for restic backup
Stars: ✭ 48 (-79.92%)
Mutual labels:  yaml, configuration
Simple-YAML
A Java API that provides an easy-to-use way to store data using the YAML format.
Stars: ✭ 68 (-71.55%)
Mutual labels:  yaml, configuration
config
Simple configuration management for PHP
Stars: ✭ 15 (-93.72%)
Mutual labels:  yaml, configuration
Config Lite
A super simple & flexible & useful config module.
Stars: ✭ 78 (-67.36%)
Mutual labels:  yaml, configuration
Configurate
A simple configuration library for Java applications providing a node structure, a variety of formats, and tools for transformation
Stars: ✭ 148 (-38.08%)
Mutual labels:  yaml, configuration

🎣 config GoDoc Build Status Coverage Status

Convenient, injection-friendly YAML configuration.

Installation

go get -u go.uber.org/config

Note that config only supports the two most recent minor versions of Go.

Quick Start

// Model your application's configuration using a Go struct.
type cfg struct {
    Parameter string
}

// Two sources of configuration to merge.
base := strings.NewReader("module: {parameter: foo}")
override := strings.NewReader("module: {parameter: bar}")

// Merge the two sources into a Provider. Later sources are higher-priority.
// See the top-level package documentation for details on the merging logic.
provider, err := config.NewYAML(config.Source(base), config.Source(override))
if err != nil {
    panic(err) // handle error
}

var c cfg
if err := provider.Get("module").Populate(&c); err != nil {
  panic(err) // handle error
}

fmt.Printf("%+v\n", c)
// Output:
// {Parameter:bar}

Development Status: Stable

All APIs are finalized, and no breaking changes will be made in the 1.x series of releases. Users of semver-aware dependency management systems should pin config to ^1.


Released under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].