Skip to content

Commit 921cb46

Browse files
authored
Update models/repo/license.go
Signed-off-by: wxiaoguang <[email protected]>
1 parent 0beced9 commit 921cb46

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

models/repo/license.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@ type RepoLicense struct { //revive:disable-line:exported
2727
type RepoLicenseList []*RepoLicense //revive:disable-line:exported
2828

2929
func (rll RepoLicenseList) StringList() []string {
30-
if len(rll) == 0 {
31-
return nil
32-
}
33-
licenses := make([]string, 0, len(rll))
30+
var licenses []string
3431
for _, rl := range rll {
3532
licenses = append(licenses, rl.License)
3633
}

0 commit comments

Comments
 (0)