-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
Copy pathmain.go
41 lines (29 loc) · 826 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package main
import (
"fmt"
"os"
_ "github.com/go-sql-driver/mysql"
_ "github.com/lifei6671/godoc/routers"
_ "github.com/astaxie/beego/session/redis"
_ "github.com/astaxie/beego/session/memcache"
_ "github.com/astaxie/beego/session/mysql"
"github.com/astaxie/beego"
"github.com/lifei6671/godoc/commands"
"github.com/lifei6671/godoc/controllers"
)
var (
VERSION string
BUILD_TIME string
GO_VERSION string
)
func main() {
fmt.Printf("MinDoc version => %s\nbuild time => %s\nstart directory => %s\n%s\n", VERSION, BUILD_TIME, os.Args[0],GO_VERSION)
commands.RegisterDataBase()
commands.RegisterModel()
commands.RegisterLogger()
commands.RegisterCommand()
commands.RegisterFunction()
beego.SetStaticPath("uploads","uploads")
beego.ErrorController(&controllers.ErrorController{})
beego.Run()
}