mirror of
https://codeberg.org/scip/tablizer.git
synced 2025-12-16 20:20:57 +01:00
@@ -23,8 +23,8 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/araddon/dateparse"
|
|
||||||
"codeberg.org/scip/tablizer/cfg"
|
"codeberg.org/scip/tablizer/cfg"
|
||||||
|
"github.com/araddon/dateparse"
|
||||||
)
|
)
|
||||||
|
|
||||||
func sortTable(conf cfg.Config, data *Tabdata) {
|
func sortTable(conf cfg.Config, data *Tabdata) {
|
||||||
@@ -38,6 +38,12 @@ func sortTable(conf cfg.Config, data *Tabdata) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for _, column := range conf.UseSortByColumn {
|
||||||
|
if column > len(data.headers) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// actual sorting
|
// actual sorting
|
||||||
sort.SliceStable(data.entries, func(i, j int) bool {
|
sort.SliceStable(data.entries, func(i, j int) bool {
|
||||||
// holds the result of a sort of one column
|
// holds the result of a sort of one column
|
||||||
|
|||||||
Reference in New Issue
Block a user