https://github.com/sv-tools/conf
Config reader
https://github.com/sv-tools/conf
conf configuration-management parser
Last synced: 4 months ago
JSON representation
Config reader
- Host: GitHub
- URL: https://github.com/sv-tools/conf
- Owner: sv-tools
- License: mit
- Created: 2021-04-23T04:07:46.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2025-05-21T03:32:51.000Z (about 1 year ago)
- Last Synced: 2025-05-21T03:34:17.856Z (about 1 year ago)
- Topics: conf, configuration-management, parser
- Language: Go
- Homepage:
- Size: 112 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# conf
[](https://github.com/sv-tools/conf/actions/workflows/checks.yaml)
[](https://pkg.go.dev/github.com/sv-tools/conf)
[](https://codecov.io/gh/sv-tools/conf)
[](https://github.com/sv-tools/conf/releases)
The configuration reader with as few dependencies as possible.
The library provides the base code only and the interfaces. All parsers and readers must be created in the separate repositories to avoid unnecessary dependencies.
## Dependencies
* The [spf13/cast](https://github.com/spf13/cast) has been added as dependency to avoid the code duplication. I will make a hard copy of it if the number of dependencies are increased.
* The [stretchr/testify](https://github.com/stretchr/testify) is used in tests only.
## Addons
* [Go Templates Transformer](https://github.com/sv-tools/conf-transformer-go-template) supports go templates by parsing and applying the templates stored in the configuration manager.
* [JSON Parser](https://github.com/sv-tools/conf-parser-json) reads a data in JSON format.
* [YAML Parser](https://github.com/sv-tools/conf-parser-yaml) reads a data in YAML format.
* [Env reader](https://github.com/sv-tools/conf-reader-env) reads the values from environment variables.
* [Flags reader](https://github.com/sv-tools/conf-reader-flags) reads the command line flags (using [pflag](https://github.com/spf13/pflag))
## Alternatives
* [viper](https://github.com/spf13/viper) is the most know library, it's very heavy and very rich in various features.
* [koanf](https://github.com/knadh/koanf) is an attempt to make a better version of the `viper`, but also contains all parsers in same repo, so the list of dependencies is pretty huge.
## License
MIT licensed. See the bundled [LICENSE](LICENSE) file for more details.