Skip to content

Commit ae5cf57

Browse files
committed
reimpl version
1 parent 1932f91 commit ae5cf57

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cmd/go-sysbench/main.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ package main
2020
import (
2121
"log"
2222
"os"
23+
"fmt"
2324

2425
"github.com/jessevdk/go-flags"
2526

@@ -29,6 +30,7 @@ import (
2930

3031
type (
3132
CmdOpts struct {
33+
Version bool `long:"version" description:"show version"`
3234
benchmark.BenchmarkOpts
3335
runner.RunnerOpts
3436
}
@@ -44,7 +46,11 @@ func main() {
4446
log.Fatal(err)
4547
}
4648

47-
if len(args) > 2 {
49+
if opts.Version {
50+
fmt.Println("go-sysbench 0.1.0")
51+
}
52+
53+
if len(args) != 2 {
4854
parser.WriteHelp(os.Stdout)
4955
os.Exit(0)
5056
}

0 commit comments

Comments
 (0)