A simple Golang library that contains license information from SPDX.
See spdx.org/licenses for more details.
if license, ok := spdx.LicenseForID("apache-2.0"); ok {
fmt.Println(license.ID()) // Apache-2.0
fmt.Println(license.Name()) // Apache License 2.0
fmt.Println(license.Reference()) // https://spdx.org/licenses/Apache-2.0.html
fmt.Println(license.DetailsURL()) // https://spdx.org/licenses/Apache-2.0.json
}
for _, license := range spdx.AllLicenses() {
fmt.Println(license)
}
This repository is still in beta, however will be promoted to stable very soon.
The original data is sourced from SPDX.
This library is offered under the Apache 2 license.