1
0
mirror of https://github.com/go-task/task.git synced 2025-12-01 22:52:02 +02:00

refactor: run task through modernize tool (#2088)

This commit is contained in:
Pete Davison
2025-02-24 11:59:50 +00:00
committed by GitHub
parent b14125bacd
commit fb631902ce
3 changed files with 8 additions and 15 deletions

View File

@@ -1,6 +1,7 @@
package sort
import (
"slices"
"sort"
"strings"
)
@@ -11,9 +12,7 @@ type Sorter func(items []string, namespaces []string) []string
// AlphaNumeric sorts the JSON output so that tasks are in alpha numeric order
// by task name.
func AlphaNumeric(items []string, namespaces []string) []string {
sort.Slice(items, func(i, j int) bool {
return items[i] < items[j]
})
slices.Sort(items)
return items
}