photoprism/pkg/report/sort.go
Michael Mayer f5a8c5a45d Auth: Session and ACL enhancements #98 #1746
Signed-off-by: Michael Mayer <michael@photoprism.app>
2022-09-28 09:01:17 +02:00

17 lines
257 B
Go

package report
import (
"sort"
)
// Sort sorts the report rows.
func Sort(rows [][]string) {
sort.Slice(rows, func(i, j int) bool {
if rows[i][0] == rows[j][0] {
return rows[i][1] < rows[j][1]
} else {
return rows[i][0] < rows[j][0]
}
})
}