package main import ( "flag" "fmt" ) const help = `Ceres - Recipe server for local networks Usage: ceres [-h | --help] [-v | --version] [-c | --config] -h, --help show this help page and exit -v, --version print version information -c, --config file path to configuration file ` var printVersion bool func init() { flag.BoolVar(&printVersion, "version", false, "print version information") flag.BoolVar(&printVersion, "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.Usage = func() { fmt.Fprintf(flag.CommandLine.Output(), help) } }