diff options
author | silverwind <me@silverwind.io> | 2022-05-10 23:55:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-10 23:55:54 +0200 |
commit | 318f360252777c6eb819ab206a1f276fa4969f3a (patch) | |
tree | 7a73ede2df5b52be940dd9b4005137c1d5d53c04 /routers | |
parent | 3c658dff233e791856496761325f5ebf787d7521 (diff) | |
download | gitea-318f360252777c6eb819ab206a1f276fa4969f3a.tar.gz gitea-318f360252777c6eb819ab206a1f276fa4969f3a.zip |
Update go tool dependencies (#19676)
* Update go tool dependencies
Updated all tool dependencies to latest tags, hoping CI will like it.
* fix new lint errors
* handle more strings.Title cases
* remove lint skip
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() } |