reverse sort tags on name if equal dates (#62)

This commit is contained in:
Dieter Maes 2022-09-01 17:13:22 +02:00 committed by GitHub
parent ad41aca4e5
commit 2aa58fc9ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,7 +25,11 @@ func (p timeSlice) Len() int {
}
func (p timeSlice) Less(i, j int) bool {
return p[i].created.After(p[j].created)
if p[i].created.Equal(p[j].created) {
return p[i].name > p[j].name
} else {
return p[i].created.After(p[j].created)
}
}
func (p timeSlice) Swap(i, j int) {