diff options
Diffstat (limited to 'models/release.go')
-rw-r--r-- | models/release.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/models/release.go b/models/release.go index 4841ae7ba3..6916970b34 100644 --- a/models/release.go +++ b/models/release.go @@ -127,7 +127,9 @@ func GetRelease(repoID int64, tagName string) (*Release, error) { // GetReleaseByID returns release with given ID. func GetReleaseByID(id int64) (*Release, error) { rel := new(Release) - has, err := x.Id(id).Get(rel) + has, err := x. + Id(id). + Get(rel) if err != nil { return nil, err } else if !has { @@ -142,7 +144,10 @@ func GetReleasesByRepoID(repoID int64, page, pageSize int) (rels []*Release, err if page <= 0 { page = 1 } - err = x.Desc("created_unix").Limit(pageSize, (page-1)*pageSize).Find(&rels, Release{RepoID: repoID}) + err = x. + Desc("created_unix"). + Limit(pageSize, (page-1)*pageSize). + Find(&rels, Release{RepoID: repoID}) return rels, err } |