Skip to content

Commit

Permalink
Merge pull request #73 from github/elr/log-writes
Browse files Browse the repository at this point in the history
add logging after writing license function files
  • Loading branch information
elrayle authored Jun 4, 2024
2 parents ac09d99 + b48a218 commit ceeb5c0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
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
}

0 comments on commit ceeb5c0

Please sign in to comment.