This commit removes the Filescanner struct implementation, which coupled unarchival of files with the scanning of them, leaving in place only Keywords. Now, main.go invokes several different goroutines, each with different concerns:
Copy files to scratch space
Recursively unarchive files in the scratch space
Run a parallelized scan on all files.
It takes the result of the final goroutine and outputs "hits" per-file basis, and write them to the output as they arrive.
This commit removes the
Filescanner
struct implementation, which coupled unarchival of files with the scanning of them, leaving in place onlyKeywords
. Now,main.go
invokes several different goroutines, each with different concerns:It takes the result of the final goroutine and outputs "hits" per-file basis, and write them to the output as they arrive.