Fix golangci-lint warnings (#17598 et al) (#17668)

Backport #17598 
Backport #17606 
Backport #17608 
Backport #17609

- Since https://gitea.com/gitea/test-env/pulls/10 the golangci-lint has been upgraded and is erroring about new warnings in the code, this PR fixes those warnings.
This commit is contained in:
Gusted authored and GitHub committed 2021-11-16 20:38:49 +00:00
1 parent 1cec7f5ab5
commit ea0fe83888
96 files changed
+139 -64

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@ func AdoptOrDeleteRepository(ctx *context.Context) {
action := ctx.Query("action")
ctxUser := ctx.User
root := filepath.Join(models.UserPath(ctxUser.LowerName))
root := models.UserPath(ctxUser.LowerName)
// check not a repo
has, err := models.IsRepositoryExist(ctxUser, dir)