mirror of
https://github.com/Quiq/docker-registry-ui.git
synced 2025-07-19 00:27:07 +00:00
reverse sort tags on name if equal dates
This commit is contained in:
parent
76f380d3c2
commit
52055dc642
@ -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