summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2016-11-27 18:14:25 +0800
committerGitHub <noreply@github.com>2016-11-27 18:14:25 +0800
commit94da47271701401b6959bfd308d6c74fd30b22e2 (patch)
tree92a6c3298ab198efa04fbe4409d282da44736640 /cmd
parent0a76d260fa16764ab66bf1623b4cd9e9adfdac27 (diff)
downloadgitea-94da47271701401b6959bfd308d6c74fd30b22e2.tar.gz
gitea-94da47271701401b6959bfd308d6c74fd30b22e2.zip
Golint fixed for modules/setting (#262)
* golint fixed for modules/setting * typo fixed and renamed UNIXSOCKET to UnixSocket
Diffstat (limited to 'cmd')
-rw-r--r--cmd/web.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/cmd/web.go b/cmd/web.go
index 3d0c977798..3bb5ef3a9c 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -123,7 +123,7 @@ func newMacaron() *macaron.Macaron {
m.Use(gzip.Gziper())
}
if setting.Protocol == setting.FCGI {
- m.SetURLPrefix(setting.AppSubUrl)
+ m.SetURLPrefix(setting.AppSubURL)
}
m.Use(macaron.Static(
path.Join(setting.StaticRootPath, "public"),
@@ -158,7 +158,7 @@ func newMacaron() *macaron.Macaron {
localFiles[name] = bindata.MustAsset("conf/locale/" + name)
}
m.Use(i18n.I18n(i18n.Options{
- SubURL: setting.AppSubUrl,
+ SubURL: setting.AppSubURL,
Files: localFiles,
CustomDirectory: path.Join(setting.CustomPath, "conf/locale"),
Langs: setting.Langs,
@@ -172,7 +172,7 @@ func newMacaron() *macaron.Macaron {
Interval: setting.CacheInterval,
}))
m.Use(captcha.Captchaer(captcha.Options{
- SubURL: setting.AppSubUrl,
+ SubURL: setting.AppSubURL,
}))
m.Use(session.Sessioner(setting.SessionConfig))
m.Use(csrf.Csrfer(csrf.Options{
@@ -180,7 +180,7 @@ func newMacaron() *macaron.Macaron {
Cookie: setting.CSRFCookieName,
SetCookie: true,
Header: "X-Csrf-Token",
- CookiePath: setting.AppSubUrl,
+ CookiePath: setting.AppSubURL,
}))
m.Use(toolbox.Toolboxer(m, toolbox.Options{
HealthCheckFuncs: []*toolbox.HealthCheckFuncDesc{
@@ -216,7 +216,7 @@ func runWeb(ctx *cli.Context) error {
m.Get("/", ignSignIn, routers.Home)
m.Group("/explore", func() {
m.Get("", func(ctx *context.Context) {
- ctx.Redirect(setting.AppSubUrl + "/explore/repos")
+ ctx.Redirect(setting.AppSubURL + "/explore/repos")
})
m.Get("/repos", routers.ExploreRepos)
m.Get("/users", routers.ExploreUsers)
@@ -635,17 +635,17 @@ func runWeb(ctx *cli.Context) error {
// Flag for port number in case first time run conflict.
if ctx.IsSet("port") {
- setting.AppUrl = strings.Replace(setting.AppUrl, setting.HTTPPort, ctx.String("port"), 1)
+ setting.AppURL = strings.Replace(setting.AppURL, setting.HTTPPort, ctx.String("port"), 1)
setting.HTTPPort = ctx.String("port")
}
var listenAddr string
- if setting.Protocol == setting.UNIX_SOCKET {
+ if setting.Protocol == setting.UnixSocket {
listenAddr = fmt.Sprintf("%s", setting.HTTPAddr)
} else {
listenAddr = fmt.Sprintf("%s:%s", setting.HTTPAddr, setting.HTTPPort)
}
- log.Info("Listen: %v://%s%s", setting.Protocol, listenAddr, setting.AppSubUrl)
+ log.Info("Listen: %v://%s%s", setting.Protocol, listenAddr, setting.AppSubURL)
var err error
switch setting.Protocol {
@@ -656,7 +656,7 @@ func runWeb(ctx *cli.Context) error {
err = server.ListenAndServeTLS(setting.CertFile, setting.KeyFile)
case setting.FCGI:
err = fcgi.Serve(nil, m)
- case setting.UNIX_SOCKET:
+ case setting.UnixSocket:
os.Remove(listenAddr)
var listener *net.UnixListener