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