diff options
author | 6543 <6543@obermui.de> | 2022-01-20 18:46:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-20 18:46:10 +0100 |
commit | 54e9ee37a7a301dbe74d46fd3c87712e6120e9bf (patch) | |
tree | 1be12fb072625c1b896b9d72f7912b018aad502b /models/repo.go | |
parent | 1d98d205f5825f40110e6628b61a97c91ac7f72d (diff) | |
download | gitea-54e9ee37a7a301dbe74d46fd3c87712e6120e9bf.tar.gz gitea-54e9ee37a7a301dbe74d46fd3c87712e6120e9bf.zip |
format with gofumpt (#18184)
* gofumpt -w -l .
* gofumpt -w -l -extra .
* Add linter
* manual fix
* change make fmt
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/models/repo.go b/models/repo.go index 83031c508c..2a857c43df 100644 --- a/models/repo.go +++ b/models/repo.go @@ -718,7 +718,7 @@ func DeleteRepository(doer *user_model.User, uid, repoID int64) error { if err != nil { return fmt.Errorf("listDeployKeys: %v", err) } - var needRewriteKeysFile = len(deployKeys) > 0 + needRewriteKeysFile := len(deployKeys) > 0 for _, dKey := range deployKeys { if err := DeleteDeployKey(ctx, doer, dKey.ID); err != nil { return fmt.Errorf("deleteDeployKeys: %v", err) @@ -844,7 +844,7 @@ func DeleteRepository(doer *user_model.User, uid, repoID int64) error { return err } - var lfsPaths = make([]string, 0, len(lfsObjects)) + lfsPaths := make([]string, 0, len(lfsObjects)) for _, v := range lfsObjects { count, err := sess.Count(&LFSMetaObject{Pointer: lfs.Pointer{Oid: v.Oid}}) if err != nil { @@ -867,7 +867,7 @@ func DeleteRepository(doer *user_model.User, uid, repoID int64) error { return err } - var archivePaths = make([]string, 0, len(archives)) + archivePaths := make([]string, 0, len(archives)) for _, v := range archives { p, _ := v.RelativePath() archivePaths = append(archivePaths, p) @@ -893,7 +893,7 @@ func DeleteRepository(doer *user_model.User, uid, repoID int64) error { return err } - var newAttachmentPaths = make([]string, 0, len(newAttachments)) + newAttachmentPaths := make([]string, 0, len(newAttachments)) for _, attach := range newAttachments { newAttachmentPaths = append(newAttachmentPaths, attach.RelativePath()) } |