Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kayac/go-config
Configuration file loader for Go
https://github.com/kayac/go-config
configuration go json toml yaml
Last synced: 3 months ago
JSON representation
Configuration file loader for Go
- Host: GitHub
- URL: https://github.com/kayac/go-config
- Owner: kayac
- License: mit
- Created: 2017-11-06T04:35:37.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-06-08T20:57:22.000Z (over 1 year ago)
- Last Synced: 2024-09-28T10:02:55.282Z (4 months ago)
- Topics: configuration, go, json, toml, yaml
- Language: Go
- Homepage:
- Size: 93.8 KB
- Stars: 31
- Watchers: 123
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-config
go-config is a configuration loader package.
See [godoc.org/github.com/kayac/go-config](https://godoc.org/github.com/kayac/go-config).
## merge-env-config
merge-env-config is the cli tool to deal with template files.
for example:
```
{
"name": "some function name",
"description": "some description",
"environment": {
"account_id": "{{ must_env `SOME_MUST_ACCOUNT_ID` }}",
"secret_key": "{{ env `SOME_SECRET_KEY` }}"
}
}
``````
$ SOME_MUST_ACCOUNT_ID=must_account_id SOME_SECRET_KEY=some_secret_key merge-env-config -json function.prod.json.tmpl
{
"name": "some function name",
"description": "some description",
"environment": {
"account_id": "must_account_id",
"secret_key": "some_secret_key"
}
}
```## Author
Copyright (c) 2017 KAYAC Inc.
## LICENSE
MIT