Last active
August 4, 2016 15:25
-
-
Save cocap10/600d3491c9f005195c3c8bc9234dfc99 to your computer and use it in GitHub Desktop.
Golang Configuration Made Easy With Flæg And Stært
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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