case insensitive name sorting
This commit is contained in:
parent
8a4b195a72
commit
2515756d1d
|
@ -49,7 +49,9 @@ func SortBySizeReverse(a, b File) int {
|
||||||
}
|
}
|
||||||
|
|
||||||
func SortByName(a, b File) int {
|
func SortByName(a, b File) int {
|
||||||
return cmp.Compare(a.Name(), b.Name())
|
an := strings.ToLower(a.Name())
|
||||||
|
bn := strings.ToLower(b.Name())
|
||||||
|
return cmp.Compare(an, bn)
|
||||||
}
|
}
|
||||||
|
|
||||||
func SortByNameReverse(a, b File) int {
|
func SortByNameReverse(a, b File) int {
|
||||||
|
|
Loading…
Reference in a new issue