Skip to content

Commit

Permalink
fix directives related to go generate in package spdx (#730)
Browse files Browse the repository at this point in the history
  • Loading branch information
josieang authored Jan 2, 2024
1 parent 16caa1a commit 70a5894
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/spdx/gen.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//go:generate go run .
//go:build exclude
// +build exclude
//go:build generate
// +build generate

//go:generate go run gen.go

package main

Expand Down Expand Up @@ -37,7 +38,7 @@ func main() {
panic(err)
}

output := "package spdx\nvar IDs = map[string]bool{\n"
output := "// Code generated by gen.go. DO NOT EDIT.\n package spdx\nvar IDs = map[string]bool{\n"
for _, license := range licenseList.Licenses {
output += fmt.Sprintf("%q: true,\n", strings.ToLower(license.SPDXID))
}
Expand Down
1 change: 1 addition & 0 deletions pkg/spdx/licenses.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 70a5894

Please sign in to comment.