summaryrefslogtreecommitdiff
path: root/flags.go
diff options
context:
space:
mode:
Diffstat (limited to 'flags.go')
-rw-r--r--flags.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/flags.go b/flags.go
index e7ff85e..862cffa 100644
--- a/flags.go
+++ b/flags.go
@@ -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()
}