File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -177,7 +177,8 @@ func (il ImageTagList) SortByCalVer() SortableImageTagList {
177
177
il .lock .RLock ()
178
178
defer il .lock .RUnlock ()
179
179
sil := make (SortableImageTagList , 0 , len (il .items ))
180
- calvers := make ([]calver.Calver , 0 , len (il .items ))
180
+ calvers := make (calver.Calvers , 0 , len (il .items ))
181
+
181
182
for _ , v := range il .items {
182
183
cv , err := calver .Parse (v .TagName )
183
184
if err != nil {
@@ -187,9 +188,7 @@ func (il ImageTagList) SortByCalVer() SortableImageTagList {
187
188
calvers = append (calvers , cv )
188
189
}
189
190
}
190
- sort .Slice (calvers , func (i , j int ) bool {
191
- return calvers [i ].String () < calvers [j ].String ()
192
- })
191
+ calvers .Sort ()
193
192
for _ , cv := range calvers {
194
193
sil = append (sil , il .items [cv .String ()])
195
194
}
You can’t perform that action at this time.
0 commit comments