diff options
author | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-06-23 21:25:37 +0200 |
---|---|---|
committer | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-06-23 21:25:37 +0200 |
commit | 1dea35b9bcb3d37d61e554a99488626da9795331 (patch) | |
tree | c8d7cea6e3b44121e067edebf91f2044f8538b6b /pkg/worker/file_scanner.go | |
parent | 8eeddc0bfb574aada6bb76638957421b52344bb0 (diff) | |
download | lens-1dea35b9bcb3d37d61e554a99488626da9795331.tar.gz lens-1dea35b9bcb3d37d61e554a99488626da9795331.tar.bz2 lens-1dea35b9bcb3d37d61e554a99488626da9795331.zip |
feat: Remove unecessary param from repo
Diffstat (limited to 'pkg/worker/file_scanner.go')
-rw-r--r-- | pkg/worker/file_scanner.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/worker/file_scanner.go b/pkg/worker/file_scanner.go index 321fbca..0dc2eb2 100644 --- a/pkg/worker/file_scanner.go +++ b/pkg/worker/file_scanner.go @@ -33,6 +33,12 @@ func (f *FileScanner) Query(ctx context.Context) (<-chan string, error) { go func() { defer close(c) _ = filepath.Walk(f.root, func(path string, info fs.FileInfo, err error) error { + select { + case <-ctx.Done(): + return filepath.SkipAll + default: + } + if info.IsDir() && filepath.Base(info.Name())[0] == '.' { return filepath.SkipDir } |