Implemented package imports

This commit is contained in:
2024-07-18 18:08:30 +02:00
parent fa373e7dc2
commit b34470a97d
21 changed files with 510 additions and 353 deletions

View File

@ -0,0 +1,21 @@
package scanner
import "os"
// queue scans the list of files.
func (s *Scanner) queue(files ...string) {
for _, file := range files {
stat, err := os.Stat(file)
if err != nil {
s.errors <- err
return
}
if stat.IsDir() {
s.queueDirectory(file, "")
} else {
s.queueFile(file, "")
}
}
}