Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsLicense ¶
returns true if the licenseExpression contains the disallowed license this implements a whole word match
Types ¶
type PackageInfo ¶
type PackageLicense ¶
Internal types that stores extracted SBOM information "name": "alpine-baselayout", "SPDXID": "SPDXRef-Package-apk-alpine-baselayout-92b19c7750fb559d", "versionInfo": "3.4.0-r0", "originator": "Person: Natanael Copa \u003cncopa@alpinelinux.org\u003e", "downloadLocation": "https://git.alpinelinux.org/cgit/aports/tree/main/alpine-baselayout", "sourceInfo": "acquired package info from APK DB: /lib/apk/db/installed", "licenseConcluded": "GPL-2.0-only", This will translate to a PackageLicense obj with the following fields: Name: alpine-baselayout Version: 3.4.0-r0 License: GPL-2.0-only (maps to licenseConcluded)
func GetPackageLicenses ¶
func GetPackageLicenses(doc spdx.Document) []PackageLicense
Get the packageLicense array from spdxDoc