diff options
Diffstat (limited to 'routers')
-rw-r--r-- | routers/init.go | 4 | ||||
-rw-r--r-- | routers/web/admin/admin.go | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/routers/init.go b/routers/init.go index 759945ce25..6036499362 100644 --- a/routers/init.go +++ b/routers/init.go @@ -10,7 +10,6 @@ import ( "reflect" "runtime" "strconv" - "strings" "code.gitea.io/gitea/models" asymkey_model "code.gitea.io/gitea/models/asymkey" @@ -31,6 +30,7 @@ import ( "code.gitea.io/gitea/modules/storage" "code.gitea.io/gitea/modules/svg" "code.gitea.io/gitea/modules/translation" + "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/modules/web" packages_router "code.gitea.io/gitea/routers/api/packages" apiv1 "code.gitea.io/gitea/routers/api/v1" @@ -111,7 +111,7 @@ func GlobalInitInstalled(ctx context.Context) { log.Info("Custom path: %s", setting.CustomPath) log.Info("Log path: %s", setting.LogRootPath) log.Info("Configuration file: %s", setting.CustomConf) - log.Info("Run Mode: %s", strings.Title(setting.RunMode)) + log.Info("Run Mode: %s", util.ToTitleCase(setting.RunMode)) // Setup i18n translation.InitLocales() diff --git a/routers/web/admin/admin.go b/routers/web/admin/admin.go index d4093f2049..78347e67c4 100644 --- a/routers/web/admin/admin.go +++ b/routers/web/admin/admin.go @@ -26,6 +26,7 @@ import ( "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" "code.gitea.io/gitea/modules/updatechecker" + "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/services/cron" "code.gitea.io/gitea/services/forms" @@ -245,7 +246,7 @@ func Config(ctx *context.Context) { ctx.Data["OfflineMode"] = setting.OfflineMode ctx.Data["DisableRouterLog"] = setting.DisableRouterLog ctx.Data["RunUser"] = setting.RunUser - ctx.Data["RunMode"] = strings.Title(setting.RunMode) + ctx.Data["RunMode"] = util.ToTitleCase(setting.RunMode) if version, err := git.LocalVersion(); err == nil { ctx.Data["GitVersion"] = version.Original() } |