use filetree reader instead of filetree

This commit is contained in:
Alex Goodman
2020-06-02 08:52:26 -04:00
parent f0b8aaacda
commit cc724bff26
6 changed files with 459 additions and 13 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ import (
type Analyzer interface {
Name() string
// TODO: add ID / Name for analyze for uniquely identifying this analyzer type
SelectFiles([]*tree.FileTree) []file.Reference
SelectFiles([]tree.FileTreeReader) []file.Reference
// NOTE: one of the errors which is returned is "IterationNeeded", which indicates to the driver to
// continue with another Select/Analyze pass
Analyze(map[file.Reference]string) ([]pkg.Package, error)
+1 -1
View File
@@ -21,7 +21,7 @@ func (a *Analyzer) Name() string {
return "dpkg-analyzer"
}
func (a *Analyzer) SelectFiles(trees []*tree.FileTree) []file.Reference {
func (a *Analyzer) SelectFiles(trees []tree.FileTreeReader) []file.Reference {
files := make([]file.Reference, 0)
for _, tree := range trees {
// TODO: extract into function/slice/etc