mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-31 22:41:53 +02:00
Merge pull request #6149 from bep/sort-caseinsensitive
Implement lexicographically string sorting
This commit is contained in:
committed by
GitHub
parent
a4f96a9d8c
commit
53077b0da5
@@ -52,7 +52,7 @@ func (s mapKeyByInt) Less(i, j int) bool { return s.mapKeyValues[i].Int() < s.ma
|
||||
type mapKeyByStr struct{ mapKeyValues }
|
||||
|
||||
func (s mapKeyByStr) Less(i, j int) bool {
|
||||
return s.mapKeyValues[i].String() < s.mapKeyValues[j].String()
|
||||
return compare.LessStrings(s.mapKeyValues[i].String(), s.mapKeyValues[j].String())
|
||||
}
|
||||
|
||||
func sortKeys(v []reflect.Value, order string) []reflect.Value {
|
||||
|
Reference in New Issue
Block a user