From 3e3bfc554b9cd5658170fdb389014e3edfb4c220 Mon Sep 17 00:00:00 2001 From: "E. Lynette Rayle" Date: Tue, 4 Jun 2024 08:24:48 -0400 Subject: [PATCH 1/2] add logging to confirm license function files were written --- cmd/exceptions.go | 1 + cmd/license.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/cmd/exceptions.go b/cmd/exceptions.go index bbafc30..f59bf3d 100644 --- a/cmd/exceptions.go +++ b/cmd/exceptions.go @@ -66,6 +66,7 @@ func extractExceptionLicenseIDs() error { if err != nil { return err } + fmt.Println("Writing `../spdxexp/spdxlicenses/get_exceptions.go`... COMPLETE") return nil } diff --git a/cmd/license.go b/cmd/license.go index 6d96bd3..430ff20 100644 --- a/cmd/license.go +++ b/cmd/license.go @@ -71,6 +71,7 @@ func extractLicenseIDs() error { if err != nil { return err } + fmt.Println("Writing `../spdxexp/spdxlicenses/get_licenses.go`... COMPLETE") // generate the GetDeprecated() function in get_deprecated.go getDeprecatedContents := []byte(`package spdxlicenses @@ -90,6 +91,7 @@ func extractLicenseIDs() error { if err != nil { return err } + fmt.Println("Writing `../spdxexp/spdxlicenses/get_deprecated.go`... COMPLETE") return nil } From b48a2185733ff7ee567c70c6bb2d41111fdb79a0 Mon Sep 17 00:00:00 2001 From: "E. Lynette Rayle" Date: Tue, 4 Jun 2024 08:31:52 -0400 Subject: [PATCH 2/2] fix unexpected white space changes --- cmd/exceptions.go | 6 +++--- cmd/license.go | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/exceptions.go b/cmd/exceptions.go index f59bf3d..04c93a4 100644 --- a/cmd/exceptions.go +++ b/cmd/exceptions.go @@ -51,9 +51,9 @@ func extractExceptionLicenseIDs() error { // generate the GetExceptions() function in get_exceptions.go getExceptionsContents := []byte(`package spdxlicenses - func GetExceptions() []string { - return []string{ - `) +func GetExceptions() []string { + return []string{ +`) for _, id := range exceptionLicenseIDs { getExceptionsContents = append(getExceptionsContents, ` "`+id+`", `...) diff --git a/cmd/license.go b/cmd/license.go index 430ff20..ca15e40 100644 --- a/cmd/license.go +++ b/cmd/license.go @@ -56,9 +56,9 @@ func extractLicenseIDs() error { // generate the GetLicenses() function in get_licenses.go getLicensesContents := []byte(`package spdxlicenses - func GetLicenses() []string { - return []string{ - `) +func GetLicenses() []string { + return []string{ +`) for _, id := range activeLicenseIDs { getLicensesContents = append(getLicensesContents, ` "`+id+`", `...) @@ -76,9 +76,9 @@ func extractLicenseIDs() error { // generate the GetDeprecated() function in get_deprecated.go getDeprecatedContents := []byte(`package spdxlicenses - func GetDeprecated() []string { - return []string{ - `) +func GetDeprecated() []string { + return []string{ +`) for _, id := range deprecatedLicenseIDs { getDeprecatedContents = append(getDeprecatedContents, ` "`+id+`", `...)