Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/creack/aef
Configuration variables management
https://github.com/creack/aef
Last synced: about 1 month ago
JSON representation
Configuration variables management
- Host: GitHub
- URL: https://github.com/creack/aef
- Owner: creack
- License: mit
- Created: 2015-01-15T03:36:49.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-01-16T18:58:18.000Z (almost 10 years ago)
- Last Synced: 2024-06-21T03:14:37.088Z (6 months ago)
- Language: Go
- Size: 133 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# aef
Configuration variables management## Example
```go
package mainimport "github.com/creack/aef"
// MailgunArgs represent the Mailgun configuration
type MailgunArgs struct {
Domain string `json:"domain" aef:"domain" aef_usage:"mailgun domain"`
APIKey string `json:"api_key" aef:"api-key"`
PublicKey string `json:"public_key" aef:"public-key"`
TplFile string `json:"tpl_file" aef:"tpl-file"`
}func main() {
mga := &MailgunArgs{}
if err := aef.Load(mga, "~/.mailgun.json"); err != nil {
log.Fatal(err)
}
fmt.Printf("% #v\n", mga)
}
```