Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/creack/aef

Configuration variables management
https://github.com/creack/aef

Last synced: about 1 month ago
JSON representation

Configuration variables management

Awesome Lists containing this project

README

        

# aef
Configuration variables management

## Example

```go
package main

import "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)
}
```