proxy.golang.org : github.com/materials-commons/config
Package config is a flexible tool kit that simplifies application configuration. It is modeled after the standard library's io and net/http packages, and inspired by the inconshreveables' log15 package. It allows you to easily set up logging the way you want for your application. It provides implementations of other standard configuration methods, such as the approach espoused for 12 factor apps (http://12factor.net/config), or the multi-level configuration scheme in viper (https://github.com/spf13/viper). Like the standard library net/http package, config relies heavily on standard interfaces, in particular the Handler and Loader interfaces. These interfaces act like lego blocks allowing you to combine them in customized ways. To get started you will need to import the library: You can now start to use the config package. The easiest way is to use the standard config object. Unless you need to create multiple configuration entries, its easiest to just use the standard, this is a package global that you can access, for example config.Get(...). Before you start using config you need to tell it how it will find its configuration information. For example, lets say all your configuration information is kept in environment variables. You can do: import (
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/materials-commons/config
License: MIT
Latest release: over 7 years ago
First release: over 7 years ago
Namespace: github.com/materials-commons
Dependent repositories: 3
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 6 days ago