Skip to content

Instantly share code, notes, and snippets.

@cocap10
Last active Aug 4, 2016
Embed
What would you like to do?
Golang Configuration Made Easy With Flæg And Stært
flaegCmd := &flaeg.Command{
Name: "flaegdemo",
Description: "flaegdemo is a golang program...(here the program description)",
Config: &config,
DefaultPointersConfig: &defaultConfigOfPointerFields,
Run: func() error {
printableConfig, _ := json.Marshal(config)
fmt.Printf("%s\n", printableConfig)
return nil
},
}
// config and defaultConfigOfPointerFields has been defined on
// https://github.com/cocap10/flaegdemo/blob/master/flaegdemo.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment