diff options
Diffstat (limited to 'flags.go')
-rw-r--r-- | flags.go | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -7,15 +7,18 @@ import ( const help = `Ceres - Recipe server for local networks -Usage: ceres [-h | --help] +Usage: ceres [-h | --help] [-v | --version] -h, --help show this help page and exit + -v, --version print version information ` -func parseFlags() { +var printVersion bool + +func init() { + flag.BoolVar(&printVersion, "version", false, "print version information") + flag.BoolVar(&printVersion, "v", false, "print version information") flag.Usage = func() { fmt.Fprintf(flag.CommandLine.Output(), help) } - - flag.Parse() } |