package main import ( "flag" "fmt" ) const help = `Ceres - Recipe server for local networks Usage: ceres [-h | --help] [-v | --version] [-c | --config] [-e | --example] -h, --help show this help page and exit -v, --version print version information -c, --config file path to configuration file -e, --examples inject example recipes on startup ` var flags struct { version bool config string examples bool } func init() { flag.BoolVar(&flags.version, "version", false, "print version information") flag.BoolVar(&flags.version, "v", false, "print version information") flag.StringVar(&flags.config, "config", "", "file path to configuration file") flag.StringVar(&flags.config, "c", "", "file path to configuration file") 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) } }