mirror of
https://github.com/anchore/syft.git
synced 2025-11-18 00:43:20 +01:00
15 lines
290 B
Go
15 lines
290 B
Go
package spdxhelpers
|
|
|
|
import "github.com/anchore/syft/syft/pkg"
|
|
|
|
func Description(p *pkg.Package) string {
|
|
switch metadata := p.Metadata.(type) {
|
|
case pkg.ApkMetadata:
|
|
return metadata.Description
|
|
case pkg.NpmPackageJSONMetadata:
|
|
return metadata.Description
|
|
default:
|
|
return ""
|
|
}
|
|
}
|