mirror of
https://github.com/anchore/syft.git
synced 2026-11-01 15:06:36 +01:00
Upgrade generic cataloger (#1281)
* add second generation of generic cataloger Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * upgrade aplm cataloger to use generic.Cataloger Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * remove pacakge found-by attribute from the definition of a package ID Signed-off-by: Alex Goodman <alex.goodman@anchore.com> Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
@@ -92,6 +92,13 @@ func NewVirtualLocationFromDirectory(responsePath, virtualResponsePath string, r
|
||||
}
|
||||
}
|
||||
|
||||
func (l Location) AccessPath() string {
|
||||
if l.VirtualPath != "" {
|
||||
return l.VirtualPath
|
||||
}
|
||||
return l.RealPath
|
||||
}
|
||||
|
||||
func (l Location) String() string {
|
||||
str := ""
|
||||
if l.ref.ID() != 0 {
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package source
|
||||
|
||||
import "io"
|
||||
|
||||
type LocationReadCloser struct {
|
||||
Location
|
||||
io.ReadCloser
|
||||
}
|
||||
|
||||
func NewLocationReadCloser(location Location, reader io.ReadCloser) LocationReadCloser {
|
||||
return LocationReadCloser{
|
||||
Location: location,
|
||||
ReadCloser: reader,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user