go-config
A go package for parsing JSON config file.
Features
- Parsing JSON config file.
- Config with default value.
Installation
$ go get github.com/monochromegane/go-config
Usage
This package uses struct for storing parsed JSON config data.
type Config struct {
Name string `json:"name" default:"default name"`
}
{
"name": "name"
}
And, you can get config by the following.
var conf Config
config.Parse("config.json", &conf)
Tasks
- Show config description.
- Set default value to slice.
Code status
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request