diff options
Diffstat (limited to 'flags.go')
-rw-r--r-- | flags.go | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -7,17 +7,22 @@ import ( const help = `Ceres - Recipe server for local networks -Usage: ceres [-h | --help] [-v | --version] +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.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) } |