Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add logging after writing license function files #73

Merged
merged 2 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions cmd/exceptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -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+`",
`...)
Expand All @@ -66,6 +66,7 @@ func extractExceptionLicenseIDs() error {
if err != nil {
return err
}
fmt.Println("Writing `../spdxexp/spdxlicenses/get_exceptions.go`... COMPLETE")

return nil
}
14 changes: 8 additions & 6 deletions cmd/license.go
Original file line number Diff line number Diff line change
Expand Up @@ -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+`",
`...)
Expand All @@ -71,13 +71,14 @@ 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

func GetDeprecated() []string {
return []string{
`)
func GetDeprecated() []string {
return []string{
`)
for _, id := range deprecatedLicenseIDs {
getDeprecatedContents = append(getDeprecatedContents, ` "`+id+`",
`...)
Expand All @@ -90,6 +91,7 @@ func extractLicenseIDs() error {
if err != nil {
return err
}
fmt.Println("Writing `../spdxexp/spdxlicenses/get_deprecated.go`... COMPLETE")

return nil
}