diff --git a/README.md b/README.md index 093b1a4..10bc43a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -[![Go Reference](https://pkg.go.dev/badge/github.com/github/go-spdx/v2@v2.1.2/spdxexp.svg)](https://pkg.go.dev/github.com/github/go-spdx/v2@v2.1.2/spdxexp) +[![Go Reference](https://pkg.go.dev/badge/github.com/github/go-spdx/v2@v2.3.0/spdxexp.svg)](https://pkg.go.dev/github.com/github/go-spdx/v2@v2.3.0/spdxexp) +[![Go Reference](https://pkg.go.dev/badge/github.com/github/go-spdx/v2@v2.3.0/spdxlicenses.svg)](https://pkg.go.dev/github.com/github/go-spdx/v2@v2.3.0/spdxlicenses) # go-spdx diff --git a/cmd/exceptions.go b/cmd/exceptions.go index 04c93a4..749bf5d 100644 --- a/cmd/exceptions.go +++ b/cmd/exceptions.go @@ -51,6 +51,10 @@ func extractExceptionLicenseIDs() error { // generate the GetExceptions() function in get_exceptions.go getExceptionsContents := []byte(`package spdxlicenses +// Code generated by go-spdx cmd/exceptions.go. DO NOT EDIT. +// Source: https://github.com/spdx/license-list-data specifies official SPDX license list. + +// GetExceptions returns a slice of exception license IDs. func GetExceptions() []string { return []string{ `) diff --git a/cmd/license.go b/cmd/license.go index ca15e40..c051189 100644 --- a/cmd/license.go +++ b/cmd/license.go @@ -56,6 +56,10 @@ func extractLicenseIDs() error { // generate the GetLicenses() function in get_licenses.go getLicensesContents := []byte(`package spdxlicenses +// Code generated by go-spdx cmd/license.go. DO NOT EDIT. +// Source: https://github.com/spdx/license-list-data specifies official SPDX license list. + +// GetLicenses returns a slice of active license IDs. func GetLicenses() []string { return []string{ `) @@ -76,6 +80,10 @@ func GetLicenses() []string { // generate the GetDeprecated() function in get_deprecated.go getDeprecatedContents := []byte(`package spdxlicenses +// Code generated by go-spdx cmd/license.go. DO NOT EDIT. +// Source: https://github.com/spdx/license-list-data specifies official SPDX license list. + +// GetDeprecated returns a slice of deprecated license IDs. func GetDeprecated() []string { return []string{ `) diff --git a/go.mod b/go.mod index 4389fc0..e353dcc 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/github/go-spdx/v2 -go 1.18 +go 1.22 require github.com/stretchr/testify v1.8.0 diff --git a/spdxexp/spdxlicenses/doc.go b/spdxexp/spdxlicenses/doc.go new file mode 100644 index 0000000..81d3860 --- /dev/null +++ b/spdxexp/spdxlicenses/doc.go @@ -0,0 +1,9 @@ +/* +Spdxlicenses package 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). + +[SPDX official machine readable license list]: https://github.com/spdx/license-list-data +*/ +package spdxlicenses diff --git a/spdxexp/spdxlicenses/get_deprecated.go b/spdxexp/spdxlicenses/get_deprecated.go index d0776a5..bef76dd 100644 --- a/spdxexp/spdxlicenses/get_deprecated.go +++ b/spdxexp/spdxlicenses/get_deprecated.go @@ -1,5 +1,9 @@ package spdxlicenses +// Code generated by go-spdx cmd/license.go. DO NOT EDIT. +// Source: https://github.com/spdx/license-list-data specifies official SPDX license list. + +// GetDeprecated returns a slice of deprecated license IDs. func GetDeprecated() []string { return []string{ "AGPL-1.0", diff --git a/spdxexp/spdxlicenses/get_exceptions.go b/spdxexp/spdxlicenses/get_exceptions.go index 0532ce6..cc55f2c 100644 --- a/spdxexp/spdxlicenses/get_exceptions.go +++ b/spdxexp/spdxlicenses/get_exceptions.go @@ -1,5 +1,9 @@ package spdxlicenses +// Code generated by go-spdx cmd/exceptions.go. DO NOT EDIT. +// Source: https://github.com/spdx/license-list-data specifies official SPDX license list. + +// GetExceptions returns a slice of exception license IDs. func GetExceptions() []string { return []string{ "389-exception", diff --git a/spdxexp/spdxlicenses/get_licenses.go b/spdxexp/spdxlicenses/get_licenses.go index 1f402ab..6675879 100644 --- a/spdxexp/spdxlicenses/get_licenses.go +++ b/spdxexp/spdxlicenses/get_licenses.go @@ -1,5 +1,9 @@ package spdxlicenses +// Code generated by go-spdx cmd/license.go. DO NOT EDIT. +// Source: https://github.com/spdx/license-list-data specifies official SPDX license list. + +// GetLicenses returns a slice of active license IDs. func GetLicenses() []string { return []string{ "0BSD",