mirror of
https://github.com/anchore/syft.git
synced 2026-10-31 14:36:33 +01:00
check for multiple delimiters when parsing pom properties
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package source
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/anchore/syft/internal/log"
|
||||
|
||||
"github.com/anchore/stereoscope/pkg/file"
|
||||
@@ -42,3 +44,21 @@ func NewLocationFromImage(virtualPath string, ref file.Reference, img *image.Ima
|
||||
ref: ref,
|
||||
}
|
||||
}
|
||||
|
||||
func (l Location) String() string {
|
||||
str := ""
|
||||
if l.ref.ID() != 0 {
|
||||
str += fmt.Sprintf("id=%d ", l.ref.ID())
|
||||
}
|
||||
|
||||
str += fmt.Sprintf("RealPath=%q", l.RealPath)
|
||||
|
||||
if l.VirtualPath != "" {
|
||||
str += fmt.Sprintf(" VirtualPath=%q", l.VirtualPath)
|
||||
}
|
||||
|
||||
if l.FileSystemID != "" {
|
||||
str += fmt.Sprintf(" Layer=%q", l.FileSystemID)
|
||||
}
|
||||
return fmt.Sprintf("Location<%s>", str)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user