mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
16 lines
299 B
Go
16 lines
299 B
Go
package spdxhelpers
|
|
|
|
import "github.com/anchore/syft/syft/pkg"
|
|
|
|
func Homepage(p pkg.Package) string {
|
|
if hasMetadata(p) {
|
|
switch metadata := p.Metadata.(type) {
|
|
case pkg.GemMetadata:
|
|
return metadata.Homepage
|
|
case pkg.NpmPackageJSONMetadata:
|
|
return metadata.Homepage
|
|
}
|
|
}
|
|
return ""
|
|
}
|