diff options
author | Victor Häggqvist <[email protected]> | 2016-02-22 19:12:37 +0100 |
---|---|---|
committer | Victor Häggqvist <[email protected]> | 2016-02-22 19:12:37 +0100 |
commit | 3b9654c123d7cd6c9932a7c260ef041c26f7d4aa (patch) | |
tree | 5a0d21b5ca8fee943f2772aee1dc97337425a597 | |
parent | d34fac9d7c3c4d89e4ba76287ac85d5e870fcd5f (diff) |
custom usage
Diffstat (limited to '')
-rw-r--r-- | goboom.go | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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() } } |