From 1efd392391e178a4832831218b0bf589a60b04be Mon Sep 17 00:00:00 2001 From: "E. Lynette Rayle" Date: Thu, 22 Oct 2026 15:20:34 -0400 Subject: [PATCH] release 2.8.0 --- README.md | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a59783e..1501617 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -[![Go Reference](https://pkg.go.dev/badge/github.com/github/go-spdx/v2@v2.7.1/spdxexp.svg)](https://pkg.go.dev/github.com/github/go-spdx/v2@v2.7.1/spdxexp) spdxexp
-[![Go Reference](https://pkg.go.dev/badge/github.com/github/go-spdx/v2@v2.7.1/spdxexp/spdxlicenses.svg)](https://pkg.go.dev/github.com/github/go-spdx/v2@v2.7.1/spdxexp/spdxlicenses) spdxlicenses +[![Go Reference](https://pkg.go.dev/badge/github.com/github/go-spdx/v2@v2.8.0/spdxexp.svg)](https://pkg.go.dev/github.com/github/go-spdx/v2@v2.8.0/spdxexp) spdxexp
+[![Go Reference](https://pkg.go.dev/badge/github.com/github/go-spdx/v2@v2.8.0/spdxexp/spdxlicenses.svg)](https://pkg.go.dev/github.com/github/go-spdx/v2@v2.8.0/spdxexp/spdxlicenses) spdxlicenses # go-spdx @@ -15,7 +15,8 @@ go get github.com/github/go-spdx@latest ## Packages -- [spdxexp](https://pkg.go.dev/github.com/github/go-spdx/spdxexp) - Expression package validates licenses and determines if a license expression is satisfied by a list of licenses. Validity of a license is determined by the SPDX license list. +- [spdxexp](https://pkg.go.dev/github.com/github/go-spdx/v2/spdxexp) - Expression package validates licenses and determines if a license expression is satisfied by a list of licenses. Validity of a license is determined by the SPDX license list. +- [spdxlicenses](https://pkg.go.dev/github.com/github/go-spdx/v2/spdxexp/spdxlicenses) - License data package provides generated SPDX license IDs, exceptions, ranges, and the SPDX License List version used to generate them. ## CLI: spdx-validate @@ -205,6 +206,21 @@ licenses, err := ExtractLicenses("(MIT AND APACHE-2.0) OR (APACHE-2.0)") assert.Equal(licenses, []string{"MIT", "Apache-2.0"}) ``` +### LicenseListVersion + +```go +func LicenseListVersion() string +``` + +Function `LicenseListVersion` is provided by the `spdxlicenses` package. It returns the version of +the SPDX License List used to generate the package's license data. + +#### Example + +```go +version := spdxlicenses.LicenseListVersion() +``` + ## Background This package was developed to support testing whether a repository's license requirements are met by an allowed-list of licenses.