Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/isayme/go-config
https://github.com/isayme/go-config
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/isayme/go-config
- Owner: isayme
- License: mit
- Created: 2019-02-09T11:00:26.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-02-27T15:22:21.000Z (10 months ago)
- Last Synced: 2024-12-11T20:09:23.779Z (12 days ago)
- Language: Go
- Size: 4.88 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Config
Simple configure loader## Features
- support json/yaml
- default config path from env `CONF_FILE_PATH`;## Example
```
package confimport "github.com/isayme/go-config"
type Config struct {
Addr string `json:"addr" yaml:"addr"`
}var cfg Config
func Get() *Config {
config.Parse(&cfg)return &cfg
}
```