mirror of
https://github.com/anchore/syft.git
synced 2026-10-31 22:46:36 +01:00
fix tests to use location instead of file.Reference
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
@@ -14,20 +14,13 @@ type Location struct {
|
||||
ref file.Reference
|
||||
}
|
||||
|
||||
func newLocation(path string) Location {
|
||||
func NewLocation(path string) Location {
|
||||
return Location{
|
||||
Path: path,
|
||||
}
|
||||
}
|
||||
|
||||
func newLocationFromRef(ref file.Reference) Location {
|
||||
return Location{
|
||||
Path: string(ref.Path),
|
||||
ref: ref,
|
||||
}
|
||||
}
|
||||
|
||||
func newLocationFromImage(ref file.Reference, img *image.Image) Location {
|
||||
func NewLocationFromImage(ref file.Reference, img *image.Image) Location {
|
||||
entry, err := img.FileCatalog.Get(ref)
|
||||
if err != nil {
|
||||
log.Warnf("unable to find file catalog entry for ref=%+v", ref)
|
||||
|
||||
Reference in New Issue
Block a user