Fix destroy not reversing the order of releases (#1777)

Fixes #1775
This commit is contained in:
Yusuke Kuoka 2021-04-20 13:27:45 +09:00 committed by GitHub
parent ae942c5288
commit 368dd13e16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -122,9 +122,9 @@ func SortedReleaseGroups(releases []Release, reverse bool) ([][]Release, error)
}
if reverse {
sort.Slice(groups, func(i, j int) bool {
return j < i
})
for i, j := 0, len(groups)-1; i < j; i, j = i+1, j-1 {
groups[i], groups[j] = groups[j], groups[i]
}
}
return groups, nil