Skip to content

Commit 6dd2c3b

Browse files
committed
Fixed linting errors for variable definitions
1 parent 42ec5ce commit 6dd2c3b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

models/repo_collaboration.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func (repo *Repository) AddCollaborator(u *User) error {
6868
}
6969

7070
func (repo *Repository) getCollaborations(e Engine) ([]*Collaboration, error) {
71-
collaborations := make([]*Collaboration, 0)
71+
var collaborations []*Collaboration
7272
return collaborations, e.Find(&collaborations, &Collaboration{RepoID: repo.ID})
7373
}
7474

models/update.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func CommitToPushCommit(commit *git.Commit) *PushCommit {
6565

6666
// ListToPushCommits transforms a list.List to PushCommits type.
6767
func ListToPushCommits(l *list.List) *PushCommits {
68-
commits := make([]*PushCommit, 0)
68+
var commits []*PushCommit
6969
var actEmail string
7070
for e := l.Front(); e != nil; e = e.Next() {
7171
commit := e.Value.(*git.Commit)

0 commit comments

Comments
 (0)