Skip to content

Commit 5ec7344

Browse files
committed
sort fs.dirs for testability
1 parent 2a941aa commit 5ec7344

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

fs/fs.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"net/http"
2626
"os"
2727
"path"
28+
"sort"
2829
"strings"
2930
"time"
3031
)
@@ -88,6 +89,9 @@ func New() (http.FileSystem, error) {
8889
fs.dirs[dn] = append(fs.dirs[dn], path.Base(fn))
8990
}
9091
}
92+
for _, s := range fs.dirs {
93+
sort.Strings(s)
94+
}
9195
return fs, nil
9296
}
9397

0 commit comments

Comments
 (0)