mirror of
https://github.com/anchore/syft.git
synced 2026-11-02 23:46:35 +01:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user