Skip to content

Commit

Permalink
feat: sort by usage in descending order (chenquan#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenquan authored Aug 8, 2022
1 parent 0736a8c commit d4a99f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/stat.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ func find(dir string, filter func(info fs.FileInfo) bool) ([]file, error) {
for f := range fileChan {
files = append(files, f)
}
sort.Slice(files, func(i, j int) bool { return files[i].name < files[j].name })
sort.Slice(files, func(i, j int) bool { return files[i].size > files[j].size })

return files, nil
}
Expand Down

0 comments on commit d4a99f0

Please sign in to comment.