mirror of
https://github.com/ehang-io/nps.git
synced 2025-09-03 12:36:54 +00:00
add print version
This commit is contained in:
@@ -37,6 +37,7 @@ var (
|
||||
debug = flag.Bool("debug", true, "npc debug")
|
||||
pprofAddr = flag.String("pprof", "", "PProf debug addr (ip:port)")
|
||||
stunAddr = flag.String("stun_addr", "stun.stunprotocol.org:3478", "stun server address (eg:stun.stunprotocol.org:3478)")
|
||||
ver = flag.Bool("version", false, "show current version")
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -44,6 +45,10 @@ func main() {
|
||||
logs.Reset()
|
||||
logs.EnableFuncCallDepth(true)
|
||||
logs.SetLogFuncCallDepth(3)
|
||||
if *ver {
|
||||
common.PrintVersion()
|
||||
return
|
||||
}
|
||||
if *logPath == "" {
|
||||
*logPath = common.GetNpcLogPath()
|
||||
}
|
||||
|
Reference in New Issue
Block a user