We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 09c6043 commit 586804bCopy full SHA for 586804b
cmd/new.go
@@ -99,11 +99,22 @@ import (
99
var (
100
GitHash = "None"
101
BuildTS = "None"
102
+
103
+ ver bool
104
)
105
106
+func init() {
107
+ flag.BoolVar(&ver, "v", false, "show version")
108
+}
109
110
func main() {
111
flag.Parse()
112
113
+ if ver {
114
+ fmt.Printf("GitHash: %s \nBuildTS: %s \n", GitHash, BuildTS)
115
+ return
116
+ }
117
118
app := service.NewWebApp()
119
app.RegisterHook(service.ConfigHook, initConfig)
120
app.RegisterHook(service.RouterHook, initRoute)
0 commit comments