mirror of
https://github.com/anchore/syft.git
synced 2026-11-02 23:46:35 +01:00
feat: Add --name option to override name in output (#1269)
This commit is contained in:
@@ -8,6 +8,10 @@ import (
|
||||
)
|
||||
|
||||
func DocumentName(srcMetadata source.Metadata) string {
|
||||
if srcMetadata.Name != "" {
|
||||
return cleanName(srcMetadata.Name)
|
||||
}
|
||||
|
||||
switch srcMetadata.Scheme {
|
||||
case source.ImageScheme:
|
||||
return cleanName(srcMetadata.ImageMetadata.UserInput)
|
||||
|
||||
Reference in New Issue
Block a user