Documentation
¶
Overview ¶
Package spdxlicenses provides functions to get licenses, deprecated licenses, and exceptions. These are auto-generated and should not be modified directly. Licenses are generated from the SPDX official machine readable license list.
In addition, this package includes a function to return license ranges for sequential licenses and ranges including modifiers (i.e. -only, -or-later).
Index ¶
- func GetDeprecated() []string
- func GetDeprecatedMap() map[string]string
- func GetExceptions() []string
- func GetExceptionsMap() map[string]string
- func GetLicenses() []string
- func GetLicensesMap() map[string]string
- func IsActiveLicense(id string) (bool, string)
- func IsDeprecatedLicense(id string) (bool, string)
- func IsException(id string) (bool, string)
- func LicenseRanges() [][][]string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDeprecated ¶
func GetDeprecated() []string
GetDeprecated returns a slice of deprecated license IDs.
func GetDeprecatedMap ¶ added in v2.6.0
GetDeprecatedMap returns a map of deprecated license IDs keyed by uppercase ID.
func GetExceptions ¶
func GetExceptions() []string
GetExceptions returns a slice of exception license IDs.
func GetExceptionsMap ¶ added in v2.6.0
GetExceptionsMap returns a map of exception license IDs keyed by uppercase ID.
func GetLicensesMap ¶ added in v2.6.0
GetLicensesMap returns a map of active license IDs keyed by uppercase ID.
func IsActiveLicense ¶ added in v2.6.0
IsActiveLicense does a case-insensitive lookup for the license id in the active licenses map. It returns true and the case-sensitive ID if found, otherwise false and the original id.
func IsDeprecatedLicense ¶ added in v2.6.0
IsDeprecatedLicense does a case-insensitive lookup for the license id in the deprecated licenses map. It returns true and the case-sensitive ID if found, otherwise false and the original id.
func IsException ¶ added in v2.6.0
IsException does a case-insensitive lookup for the exception id in the exceptions map. It returns true and the case-sensitive ID if found, otherwise false and the original id.
func LicenseRanges ¶
func LicenseRanges() [][][]string
LicenseRanges returns a list of license ranges.
Ranges are organized into groups (referred to as license groups) of the same base license (e.g. GPL). Groups have sub-groups of license versions (referred to as the range) where each member is considered to be the same version (e.g. {GPL-2.0, GPL-2.0-only}). The sub-groups are in ascending order within the license group, such that the first sub-group is considered to be less than the second sub-group, and so on. (e.g. {{GPL-1.0}, {GPL-2.0, GPL-2.0-only}} implies {GPL-1.0} < {GPL-2.0, GPL-2.0-only}).
Types ¶
This section is empty.