Skip to content

Commit

Permalink
capability: fix "generated code" comment
Browse files Browse the repository at this point in the history
According to [1], the generated files should contain a comment which
matches the following regexp:

	^// Code generated .* DO NOT EDIT\.$

Fix accordingly.

[1]: https://pkg.go.dev/cmd/go#hdr-Generate_Go_files_by_processing_source

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
  • Loading branch information
kolyshkin committed Sep 20, 2024
1 parent 7d73c88 commit 4c7f697
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion capability/enum_gen.go

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

2 changes: 1 addition & 1 deletion capability/enumgen/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type generator struct {
}

func (g *generator) writeHeader() {
g.buf.WriteString("// generated file; DO NOT EDIT - use go generate in directory with source\n")
g.buf.WriteString("// Code generated by go generate; DO NOT EDIT.\n")
g.buf.WriteString("\n")
g.buf.WriteString("package capability")
}
Expand Down

0 comments on commit 4c7f697

Please sign in to comment.