mirror of
https://codeberg.org/scip/tablizer.git
synced 2025-12-17 04:30:56 +01:00
added -D to alter sort order to descending order (default: ascending)
This commit is contained in:
@@ -41,6 +41,9 @@ func sortTable(data *Tabdata, col int) {
|
||||
|
||||
// actual sorting
|
||||
sort.SliceStable(data.entries, func(i, j int) bool {
|
||||
if SortDescending {
|
||||
return data.entries[i][col] > data.entries[j][col]
|
||||
}
|
||||
return data.entries[i][col] < data.entries[j][col]
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user