Documentation
¶
Overview ¶
Package license provides SPDX license identifier normalization. It embeds the official SPDX license list and the CycloneDX curated alias mapping, then maps free-form license names and URLs to their canonical SPDX identifiers.
Update the embedded data with:
go generate ./license/
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Normalize ¶
Normalize maps a license name or URL to its SPDX identifier or expression. It tries the following in order:
- Exact SPDX ID match (input is already a valid SPDX ID)
- URL match against seeAlso cross-references from the SPDX license list
- Name match against official SPDX license names (case-insensitive)
- Name match against CycloneDX curated alias mapping (case-insensitive)
Returns the original input unchanged if no match is found.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.