添加版本号标识

This commit is contained in:
Minho
2017-05-04 10:35:56 +08:00
parent 5f591305d9
commit 9cb4b6aa25
3 changed files with 13 additions and 12 deletions

10
main.go
View File

@@ -13,8 +13,16 @@ import (
"github.com/lifei6671/godoc/controllers"
)
var (
VERSION string
BUILD_TIME string
GO_VERSION string
)
func main() {
fmt.Printf("MinDoc version%s\n%s\n%s\nstart directory%s\n", VERSION, BUILD_TIME, GO_VERSION,os.Args[0])
commands.RegisterDataBase()
commands.RegisterModel()
commands.RegisterLogger()
@@ -23,7 +31,7 @@ func main() {
beego.SetStaticPath("uploads","uploads")
fmt.Println(os.Args[0])
beego.ErrorController(&controllers.ErrorController{})
beego.Run()