aboutsummaryrefslogtreecommitdiffstats
path: root/routers/install.go
diff options
context:
space:
mode:
authorkolaente <k@knt.li>2020-10-11 22:27:20 +0200
committerGitHub <noreply@github.com>2020-10-11 21:27:20 +0100
commit64133126cdb842a047b2cd104c2f177f6e83f79a (patch)
tree8bfd86c1f7a3c565c19552c588758674384796e3 /routers/install.go
parente35f7e81ae7ed8388a8011baa43cb4faf42ebfe0 (diff)
downloadgitea-64133126cdb842a047b2cd104c2f177f6e83f79a.tar.gz
gitea-64133126cdb842a047b2cd104c2f177f6e83f79a.zip
Update golangci-lint to version 1.31.0 (#13102)
This PR updates golangci-lint to the latest version 1.31.0. The upgrade introduced a new check for which I've fixed or disabled most cases. Signed-off-by: kolaente <k@knt.li>
Diffstat (limited to 'routers/install.go')
-rw-r--r--routers/install.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/install.go b/routers/install.go
index a136cf44b2..a7fe557748 100644
--- a/routers/install.go
+++ b/routers/install.go
@@ -172,7 +172,7 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) {
}
// Test repository root path.
- form.RepoRootPath = strings.Replace(form.RepoRootPath, "\\", "/", -1)
+ form.RepoRootPath = strings.ReplaceAll(form.RepoRootPath, "\\", "/")
if err = os.MkdirAll(form.RepoRootPath, os.ModePerm); err != nil {
ctx.Data["Err_RepoRootPath"] = true
ctx.RenderWithErr(ctx.Tr("install.invalid_repo_path", err), tplInstall, &form)
@@ -181,7 +181,7 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) {
// Test LFS root path if not empty, empty meaning disable LFS
if form.LFSRootPath != "" {
- form.LFSRootPath = strings.Replace(form.LFSRootPath, "\\", "/", -1)
+ form.LFSRootPath = strings.ReplaceAll(form.LFSRootPath, "\\", "/")
if err := os.MkdirAll(form.LFSRootPath, os.ModePerm); err != nil {
ctx.Data["Err_LFSRootPath"] = true
ctx.RenderWithErr(ctx.Tr("install.invalid_lfs_path", err), tplInstall, &form)
@@ -190,7 +190,7 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) {
}
// Test log root path.
- form.LogRootPath = strings.Replace(form.LogRootPath, "\\", "/", -1)
+ form.LogRootPath = strings.ReplaceAll(form.LogRootPath, "\\", "/")
if err = os.MkdirAll(form.LogRootPath, os.ModePerm); err != nil {
ctx.Data["Err_LogRootPath"] = true
ctx.RenderWithErr(ctx.Tr("install.invalid_log_root_path", err), tplInstall, &form)