summaryrefslogtreecommitdiff
path: root/flags.go
diff options
context:
space:
mode:
Diffstat (limited to 'flags.go')
-rw-r--r--flags.go14
1 files changed, 8 insertions, 6 deletions
diff --git a/flags.go b/flags.go
index c7d3cff..1e802a1 100644
--- a/flags.go
+++ b/flags.go
@@ -16,18 +16,20 @@ Usage: ceres [-h | --help] [-v | --version] [-c | --config]
-e, --examples inject example recipes on startup
`
-var printVersion bool
-var injectExamples bool
+var flags struct {
+ version bool
+ examples bool
+}
func init() {
- flag.BoolVar(&printVersion, "version", false, "print version information")
- flag.BoolVar(&printVersion, "v", false, "print version information")
+ flag.BoolVar(&flags.version, "version", false, "print version information")
+ flag.BoolVar(&flags.version, "v", false, "print version information")
flag.StringVar(&config.Path, "config", "", "file path to configuration file")
flag.StringVar(&config.Path, "c", "", "file path to configuration file")
- flag.BoolVar(&injectExamples, "examples", false, "inject example recipes on startup")
- flag.BoolVar(&injectExamples, "e", false, "inject example recipes on startup")
+ flag.BoolVar(&flags.examples, "examples", false, "inject example recipes on startup")
+ flag.BoolVar(&flags.examples, "e", false, "inject example recipes on startup")
flag.Usage = func() {
fmt.Fprintf(flag.CommandLine.Output(), help)