Implemented structs
This commit is contained in:
@ -1,20 +1,25 @@
|
||||
package scanner
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
|
||||
"git.akyoto.dev/cli/q/src/config"
|
||||
"git.akyoto.dev/cli/q/src/core"
|
||||
"git.akyoto.dev/cli/q/src/fs"
|
||||
"git.akyoto.dev/cli/q/src/types"
|
||||
)
|
||||
|
||||
// Scan scans the list of files.
|
||||
func Scan(files []string) (<-chan *fs.File, <-chan *core.Function, <-chan *types.Type, <-chan error) {
|
||||
func Scan(files []string) (<-chan *fs.File, <-chan *core.Function, <-chan types.Type, <-chan error) {
|
||||
scanner := Scanner{
|
||||
files: make(chan *fs.File),
|
||||
functions: make(chan *core.Function),
|
||||
types: make(chan *types.Type),
|
||||
types: make(chan types.Type),
|
||||
errors: make(chan error),
|
||||
}
|
||||
|
||||
scanner.queueDirectory(filepath.Join(config.Library, "mem"), "mem")
|
||||
|
||||
go func() {
|
||||
scanner.queue(files...)
|
||||
scanner.group.Wait()
|
||||
|
Reference in New Issue
Block a user