Simplified file structure

This commit is contained in:
Eduard Urbach 2024-08-07 19:39:10 +02:00
parent cacee7260a
commit a466281307
Signed by: eduard
GPG key ID: 49226B848C78F6C8
219 changed files with 453 additions and 457 deletions

View file

@ -1,25 +0,0 @@
package scanner
import (
"git.akyoto.dev/cli/q/src/build/core"
"git.akyoto.dev/cli/q/src/build/fs"
)
// Scan scans the list of files.
func Scan(files []string) (<-chan *fs.File, <-chan *core.Function, <-chan error) {
scanner := Scanner{
files: make(chan *fs.File),
functions: make(chan *core.Function),
errors: make(chan error),
}
go func() {
scanner.queue(files...)
scanner.group.Wait()
close(scanner.files)
close(scanner.functions)
close(scanner.errors)
}()
return scanner.files, scanner.functions, scanner.errors
}