mirror of
https://github.com/ehang-io/nps.git
synced 2025-09-04 21:56:53 +00:00
add print version
This commit is contained in:
@@ -28,11 +28,16 @@ import (
|
||||
|
||||
var (
|
||||
level string
|
||||
ver = flag.Bool("version", false, "show current version")
|
||||
)
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
// init log
|
||||
if *ver {
|
||||
common.PrintVersion()
|
||||
return
|
||||
}
|
||||
if err := beego.LoadAppConfig("ini", filepath.Join(common.GetRunPath(), "conf", "nps.conf")); err != nil {
|
||||
log.Fatalln("load config file error", err.Error())
|
||||
}
|
||||
|
Reference in New Issue
Block a user