Skip to content

Commit

Permalink
brio-gen: fix generated code to follow the Go standard
Browse files Browse the repository at this point in the history
Fix brio-gen to produce files with the standard Go header for generated
files.
See https://golang.org/s/generatedcode
  • Loading branch information
dolmen authored and sbinet committed May 10, 2022
1 parent 3396f5f commit 7fe81f6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion brio/cmd/brio-gen/internal/gen/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,8 @@ func qualTypeName(t types.Type, pkg *types.Package) string {
func (g *Generator) Format() ([]byte, error) {
buf := new(bytes.Buffer)

buf.WriteString(fmt.Sprintf(`// DO NOT EDIT; automatically generated by %[1]s
// See standard at https://golang.org/s/generatedcode
buf.WriteString(fmt.Sprintf(`// Code generated by %[1]s; DO NOT EDIT.
package %[2]s
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// DO NOT EDIT; automatically generated by brio-gen
// Code generated by brio-gen; DO NOT EDIT.

package pkg

Expand Down
2 changes: 1 addition & 1 deletion brio/cmd/brio-gen/testdata/briotest_brio.go

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

2 changes: 1 addition & 1 deletion brio/cmd/brio-gen/testdata/image_brio.go

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

0 comments on commit 7fe81f6

Please sign in to comment.