ignore case when sorting by extension
This commit is contained in:
parent
7fade0ce4c
commit
0fb1cfa22a
|
@ -72,14 +72,14 @@ func SortByPathReverse(a, b File) int {
|
||||||
}
|
}
|
||||||
|
|
||||||
func SortByExtension(a, b File) int {
|
func SortByExtension(a, b File) int {
|
||||||
aext := filepath.Ext(a.Name())
|
aext := strings.ToLower(filepath.Ext(a.Name()))
|
||||||
bext := filepath.Ext(b.Name())
|
bext := strings.ToLower(filepath.Ext(b.Name()))
|
||||||
return cmp.Compare(aext, bext)
|
return cmp.Compare(aext, bext)
|
||||||
}
|
}
|
||||||
|
|
||||||
func SortByExtensionReverse(a, b File) int {
|
func SortByExtensionReverse(a, b File) int {
|
||||||
aext := filepath.Ext(a.Name())
|
aext := strings.ToLower(filepath.Ext(a.Name()))
|
||||||
bext := filepath.Ext(b.Name())
|
bext := strings.ToLower(filepath.Ext(b.Name()))
|
||||||
return cmp.Compare(bext, aext)
|
return cmp.Compare(bext, aext)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue