summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Häggqvist <[email protected]>2016-02-22 19:12:37 +0100
committerVictor Häggqvist <[email protected]>2016-02-22 19:12:37 +0100
commit3b9654c123d7cd6c9932a7c260ef041c26f7d4aa (patch)
tree5a0d21b5ca8fee943f2772aee1dc97337425a597
parentd34fac9d7c3c4d89e4ba76287ac85d5e870fcd5f (diff)
custom usage
-rw-r--r--goboom.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/goboom.go b/goboom.go
index 5e26fd1..361bbcf 100644
--- a/goboom.go
+++ b/goboom.go
@@ -227,6 +227,12 @@ func main() {
flag.BoolVar(&postPhase, "post", false, "Update ranking DB")
flag.BoolVar(&stats, "stats", false, "View DB stats")
flag.BoolVar(&gc, "gc", false, "Run garbage collection of the DB")
+ flag.Usage = func() {
+ fmt.Printf("goboom v%s (%s/%s/%s)\n", version, runtime.GOOS, runtime.GOARCH, runtime.Version())
+ fmt.Print("\nTo actually use goboom execute goboom_run\n\n")
+ fmt.Println("Options: ")
+ flag.PrintDefaults()
+ }
flag.Parse()
loadIni()
@@ -250,8 +256,6 @@ func main() {
} else if gc {
fmt.Printf("Removed %d items\n", runGC())
} else {
- fmt.Printf("goboom v%s (%s/%s/%s)\n", version, runtime.GOOS, runtime.GOARCH, runtime.Version())
- fmt.Println("\nTo actually use goboom execute goboom_run\n")
flag.Usage()
}
}