From 3ec43077bc236956754330562edc56e0016d3a37 Mon Sep 17 00:00:00 2001 From: bufdev Date: Fri, 27 Sep 2024 20:27:57 -0400 Subject: [PATCH] Update README.md --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a994b80..eedda10 100644 --- a/README.md +++ b/README.md @@ -10,13 +10,16 @@ A simple Golang library that contains license information from [SPDX](https://sp See [spdx.org/licenses](https://spdx.org/licenses) for more details. ```go -license, ok := spdx.GetLicense("apache-2.0") -if ok { +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