mirror of
https://github.com/Quiq/docker-registry-ui.git
synced 2025-07-18 16:21:24 +00:00
reverse sort tags on name if equal dates (#62)
This commit is contained in:
parent
ad41aca4e5
commit
2aa58fc9ba
@ -25,8 +25,12 @@ func (p timeSlice) Len() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p timeSlice) Less(i, j int) bool {
|
func (p timeSlice) Less(i, j int) bool {
|
||||||
|
if p[i].created.Equal(p[j].created) {
|
||||||
|
return p[i].name > p[j].name
|
||||||
|
} else {
|
||||||
return p[i].created.After(p[j].created)
|
return p[i].created.After(p[j].created)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (p timeSlice) Swap(i, j int) {
|
func (p timeSlice) Swap(i, j int) {
|
||||||
p[i], p[j] = p[j], p[i]
|
p[i], p[j] = p[j], p[i]
|
||||||
|
Loading…
Reference in New Issue
Block a user