Add layer information for go-module-binary-cataloger (#620)

* update functions to pass Location

Signed-off-by: Christopher Angelo Phillips <christopher.phillips@anchore.com>

* update unit tests to pass new locations

Signed-off-by: Christopher Angelo Phillips <christopher.phillips@anchore.com>

* fix image source.FileResolvers to include layer info

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

* add non-empty location in golang binary cataloger testing

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

Co-authored-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
Christopher Angelo Phillips
2021-11-08 16:05:53 -05:00
committed by GitHub
co-authored by Alex Goodman
parent bb0f35bac4
commit 9bbc9ff633
8 changed files with 87 additions and 23 deletions
-8
View File
@@ -53,14 +53,6 @@ func NewLocationFromDirectory(responsePath string, ref file.Reference) Location
}
}
func NewLocationFromReference(ref file.Reference) Location {
return Location{
VirtualPath: string(ref.RealPath),
RealPath: string(ref.RealPath),
ref: ref,
}
}
func (l Location) String() string {
str := ""
if l.ref.ID() != 0 {