Skip to content

Commit 7a4d932

Browse files
committed
Made it so that required non-nullable values are either not present or are initialized.
1 parent 8b537a4 commit 7a4d932

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

models/repo/license.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +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-
var licenses []string
30+
var licenses []string = make([]string, 0, len(rll))
3131
for _, rl := range rll {
3232
licenses = append(licenses, rl.License)
3333
}

modules/structs/repo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ type Repository struct {
114114
ObjectFormatName string `json:"object_format_name"`
115115
// swagger:strfmt date-time
116116
MirrorUpdated time.Time `json:"mirror_updated"`
117-
RepoTransfer *RepoTransfer `json:"repo_transfer"`
117+
RepoTransfer *RepoTransfer `json:"repo_transfer,omitempty"`
118118
Topics []string `json:"topics"`
119119
Licenses []string `json:"licenses"`
120120
}

0 commit comments

Comments
 (0)