Skip to content

A simple Golang library that contains license information from SPDX.

License

Notifications You must be signed in to change notification settings

bufbuild/spdx-go

Repository files navigation

spdx-go

Build Report Card GoDoc Slack

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)
}

Status: Beta

This repository is still in beta, however will be promoted to stable very soon.

Legal

The original data is sourced from SPDX.

This library is offered under the Apache 2 license.