summaryrefslogtreecommitdiff
path: root/goboom.go
diff options
context:
space:
mode:
authorVictor Häggqvist <[email protected]>2016-03-28 00:41:14 +0200
committerVictor Häggqvist <[email protected]>2016-03-28 00:41:14 +0200
commitf6fd580a0e597de23f0eab351e8d2fdfcfb520e2 (patch)
treef8e92215afedec24f7078f47fe07b9bada6a424a /goboom.go
parent3b9654c123d7cd6c9932a7c260ef041c26f7d4aa (diff)
use my pflag and goxc
Diffstat (limited to '')
-rw-r--r--goboom.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/goboom.go b/goboom.go
index 361bbcf..0c8dad8 100644
--- a/goboom.go
+++ b/goboom.go
@@ -7,16 +7,15 @@ import (
"os"
"os/user"
"path/filepath"
- "runtime"
"sort"
"strings"
"github.com/go-ini/ini"
"github.com/gocarina/gocsv"
- flag "github.com/ogier/pflag"
+ flag "github.com/victorhaggqvist/pflag"
)
-const version = "0.2"
+var version = "0.0.0" // injected at build time
type Runnable struct {
Cmd string `csv:"name"`
@@ -227,8 +226,9 @@ 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.Version = version
flag.Usage = func() {
- fmt.Printf("goboom v%s (%s/%s/%s)\n", version, runtime.GOOS, runtime.GOARCH, runtime.Version())
+ flag.PrintVersion()
fmt.Print("\nTo actually use goboom execute goboom_run\n\n")
fmt.Println("Options: ")
flag.PrintDefaults()