Skip to content

Commit 0a44b9c

Browse files
committed
fine tune listAllFiles
1 parent bb7b7f7 commit 0a44b9c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/assetfs/layered.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ func (l *LayeredFS) ListFiles(name string, fileMode ...bool) ([]string, error) {
148148
// * true: only files will be returned.
149149
// * false: only directories will be returned.
150150
func (l *LayeredFS) ListAllFiles(name string, fileMode ...bool) ([]string, error) {
151-
return l.listAllFiles(l.layers, name, fileMode...)
151+
return listAllFiles(l.layers, name, fileMode...)
152152
}
153153

154-
func (l *LayeredFS) listAllFiles(layers []*Layer, name string, fileMode ...bool) ([]string, error) {
154+
func listAllFiles(layers []*Layer, name string, fileMode ...bool) ([]string, error) {
155155
fileMap := map[string]bool{}
156156
var list func(dir string) error
157157
list = func(dir string) error {
@@ -216,7 +216,7 @@ func (l *LayeredFS) WatchLocalChanges(ctx context.Context, callback func()) {
216216
if layer.localPath == "" {
217217
continue
218218
}
219-
layerDirs, err := l.listAllFiles([]*Layer{layer}, ".", false)
219+
layerDirs, err := listAllFiles([]*Layer{layer}, ".", false)
220220
if err != nil {
221221
log.Error("Unable to list directories for asset local file-system %q: %v", layer.localPath, err)
222222
continue

0 commit comments

Comments
 (0)