Skip to content

Commit 70a5894

Browse files
authored
fix directives related to go generate in package spdx (google#730)
1 parent 16caa1a commit 70a5894

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

pkg/spdx/gen.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
//go:generate go run .
2-
//go:build exclude
3-
// +build exclude
1+
//go:build generate
2+
// +build generate
3+
4+
//go:generate go run gen.go
45

56
package main
67

@@ -37,7 +38,7 @@ func main() {
3738
panic(err)
3839
}
3940

40-
output := "package spdx\nvar IDs = map[string]bool{\n"
41+
output := "// Code generated by gen.go. DO NOT EDIT.\n package spdx\nvar IDs = map[string]bool{\n"
4142
for _, license := range licenseList.Licenses {
4243
output += fmt.Sprintf("%q: true,\n", strings.ToLower(license.SPDXID))
4344
}

pkg/spdx/licenses.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)