mindoc/main.go

40 lines
824 B
Go
Raw Normal View History

2017-04-19 18:19:27 +08:00
package main
import (
2017-04-21 18:20:35 +08:00
_ "github.com/go-sql-driver/mysql"
2017-04-19 18:19:27 +08:00
_ "github.com/lifei6671/godoc/routers"
2017-05-03 15:05:01 +08:00
_ "github.com/astaxie/beego/session/redis"
_ "github.com/astaxie/beego/session/memcache"
_ "github.com/astaxie/beego/session/mysql"
2017-04-19 18:19:27 +08:00
"github.com/astaxie/beego"
2017-04-21 18:20:35 +08:00
"github.com/lifei6671/godoc/commands"
2017-05-01 16:40:35 +08:00
"fmt"
"os"
2017-05-03 14:22:05 +08:00
"github.com/lifei6671/godoc/controllers"
2017-04-19 18:19:27 +08:00
)
2017-05-04 10:35:56 +08:00
var (
VERSION string
BUILD_TIME string
GO_VERSION string
)
2017-04-19 18:19:27 +08:00
func main() {
2017-05-01 17:43:33 +08:00
2017-05-04 10:52:58 +08:00
fmt.Printf("MinDoc version => %s\nbuild time => %s\nstart directory => %s\n%s\n", VERSION, BUILD_TIME, os.Args[0],GO_VERSION)
2017-05-04 10:35:56 +08:00
2017-04-21 18:20:35 +08:00
commands.RegisterDataBase()
commands.RegisterModel()
commands.RegisterLogger()
commands.RegisterCommand()
commands.RegisterFunction()
2017-04-20 18:19:32 +08:00
beego.SetStaticPath("uploads","uploads")
2017-05-01 19:12:52 +08:00
2017-05-04 10:35:56 +08:00
2017-05-01 17:26:59 +08:00
2017-05-03 14:22:05 +08:00
beego.ErrorController(&controllers.ErrorController{})
2017-04-19 18:19:27 +08:00
beego.Run()
}
2017-05-03 14:22:05 +08:00