diff options
Diffstat (limited to 'services/repository')
-rw-r--r-- | services/repository/adopt.go | 3 | ||||
-rw-r--r-- | services/repository/adopt_test.go | 2 | ||||
-rw-r--r-- | services/repository/archiver/archiver.go | 2 | ||||
-rw-r--r-- | services/repository/archiver/archiver_test.go | 2 | ||||
-rw-r--r-- | services/repository/push.go | 2 |
5 files changed, 6 insertions, 5 deletions
diff --git a/services/repository/adopt.go b/services/repository/adopt.go index adc5942a3c..46337254b2 100644 --- a/services/repository/adopt.go +++ b/services/repository/adopt.go @@ -252,7 +252,8 @@ func checkUnadoptedRepositories(userName string, repoNamesToCheck []string, unad ListOptions: db.ListOptions{ Page: 1, PageSize: len(repoNamesToCheck), - }, LowerNames: repoNamesToCheck}) + }, LowerNames: repoNamesToCheck, + }) if err != nil { return err } diff --git a/services/repository/adopt_test.go b/services/repository/adopt_test.go index 2053151106..685bfe9bc4 100644 --- a/services/repository/adopt_test.go +++ b/services/repository/adopt_test.go @@ -69,7 +69,7 @@ func TestListUnadoptedRepositories_ListOptions(t *testing.T) { username := "user2" unadoptedList := []string{path.Join(username, "unadopted1"), path.Join(username, "unadopted2")} for _, unadopted := range unadoptedList { - _ = os.Mkdir(path.Join(setting.RepoRootPath, unadopted+".git"), 0755) + _ = os.Mkdir(path.Join(setting.RepoRootPath, unadopted+".git"), 0o755) } opts := db.ListOptions{Page: 1, PageSize: 1} diff --git a/services/repository/archiver/archiver.go b/services/repository/archiver/archiver.go index 93ec8bcca2..f982e2ef7b 100644 --- a/services/repository/archiver/archiver.go +++ b/services/repository/archiver/archiver.go @@ -172,7 +172,7 @@ func doArchive(r *ArchiveRequest) (*repo_model.RepoArchiver, error) { w.Close() rd.Close() }() - var done = make(chan error) + done := make(chan error) repo, err := repo_model.GetRepositoryByID(archiver.RepoID) if err != nil { return nil, fmt.Errorf("archiver.LoadRepo failed: %v", err) diff --git a/services/repository/archiver/archiver_test.go b/services/repository/archiver/archiver_test.go index 2c0b46d3d4..b7fb6cb0ca 100644 --- a/services/repository/archiver/archiver_test.go +++ b/services/repository/archiver/archiver_test.go @@ -128,6 +128,6 @@ func TestArchive_Basic(t *testing.T) { } func TestErrUnknownArchiveFormat(t *testing.T) { - var err = ErrUnknownArchiveFormat{RequestFormat: "master"} + err := ErrUnknownArchiveFormat{RequestFormat: "master"} assert.True(t, errors.Is(err, ErrUnknownArchiveFormat{})) } diff --git a/services/repository/push.go b/services/repository/push.go index 62e2104432..518ad04157 100644 --- a/services/repository/push.go +++ b/services/repository/push.go @@ -312,7 +312,7 @@ func pushUpdateAddTags(ctx context.Context, repo *repo_model.Repository, gitRepo sig = commit.Committer } var author *user_model.User - var createdAt = time.Unix(1, 0) + createdAt := time.Unix(1, 0) if sig != nil { var ok bool |