Improve overall documentation (#148)

* improve overall documentation

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>

* fix tests to use scope.Resolver over scope

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
Alex Goodman
2020-08-13 16:34:32 -04:00
committed by GitHub
parent 47a0454084
commit 95517d131a
35 changed files with 177 additions and 72 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ func TestJsonDirsPresenter(t *testing.T) {
},
})
s, err := scope.NewScopeFromDir("/some/path", scope.AllLayersScope)
s, err := scope.NewScopeFromDir("/some/path")
if err != nil {
t.Fatal(err)
}
+6
View File
@@ -1,3 +1,7 @@
/*
Defines a Presenter interface for displaying catalog results to an io.Writer as well as a helper utility to obtain
a specific Presenter implementation given user configuration.
*/
package presenter
import (
@@ -10,6 +14,8 @@ import (
"github.com/anchore/syft/syft/scope"
)
// Presenter defines the expected behavior for an object responsible for displaying arbitrary input and processed data
// to a given io.Writer.
type Presenter interface {
Present(io.Writer) error
}
+1 -1
View File
@@ -31,7 +31,7 @@ func TestTextDirPresenter(t *testing.T) {
Type: pkg.DebPkg,
})
s, err := scope.NewScopeFromDir("/some/path", scope.AllLayersScope)
s, err := scope.NewScopeFromDir("/some/path")
if err != nil {
t.Fatalf("unable to create scope: %+v", err)
}