diff options
author | Unknown <joe2010xtmf@163.com> | 2014-03-07 17:22:15 -0500 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-03-07 17:22:15 -0500 |
commit | 5a05d6633d413b1c5182a0a542e173f99601a103 (patch) | |
tree | b6d343ca8c998909839d1364f466f7af223fdd1b /web.go | |
parent | a2a59f8ad1192d3504abd50b2daf2ebfd97c86ca (diff) | |
download | gitea-5a05d6633d413b1c5182a0a542e173f99601a103.tar.gz gitea-5a05d6633d413b1c5182a0a542e173f99601a103.zip |
Merge utils to modules
Diffstat (limited to 'web.go')
-rw-r--r-- | web.go | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -18,11 +18,10 @@ import ( "github.com/gogits/gogs/modules/auth" "github.com/gogits/gogs/modules/base" + "github.com/gogits/gogs/modules/log" "github.com/gogits/gogs/routers" "github.com/gogits/gogs/routers/repo" "github.com/gogits/gogs/routers/user" - "github.com/gogits/gogs/utils" - "github.com/gogits/gogs/utils/log" ) var CmdWeb = cli.Command{ @@ -39,7 +38,7 @@ gogs web`, var AppHelpers template.FuncMap = map[string]interface{}{ "AppName": func() string { - return utils.Cfg.MustValue("", "APP_NAME") + return base.Cfg.MustValue("", "APP_NAME") }, "AppVer": func() string { return APP_VER @@ -47,7 +46,7 @@ var AppHelpers template.FuncMap = map[string]interface{}{ } func runWeb(*cli.Context) { - log.Info("%s %s", utils.Cfg.MustValue("", "APP_NAME"), APP_VER) + log.Info("%s %s", base.Cfg.MustValue("", "APP_NAME"), APP_VER) m := martini.Classic() @@ -75,8 +74,8 @@ func runWeb(*cli.Context) { m.Any("/repo/list", auth.SignInRequire(false), repo.List) listenAddr := fmt.Sprintf("%s:%s", - utils.Cfg.MustValue("server", "HTTP_ADDR"), - utils.Cfg.MustValue("server", "HTTP_PORT", "3000")) + base.Cfg.MustValue("server", "HTTP_ADDR"), + base.Cfg.MustValue("server", "HTTP_PORT", "3000")) log.Info("Listen: %s", listenAddr) http.ListenAndServe(listenAddr, m) } |