Преглед изворни кода

protoc-gen-go: follow the new code generation comment convention (#329)

https://golang.org/s/generatedcode introduces a new convention for generated
code. To mark a file as generated, there should be a comment with no whitespace
in front of it. The comment should start with ' Code generated' and and with 'DO
NOT EDIT.', all on the same line.
Spencer Nelson пре 8 година
родитељ
комит
47eb67eaf5
1 измењених фајлова са 1 додато и 2 уклоњено
  1. 1 2
      protoc-gen-go/generator/generator.go

+ 1 - 2
protoc-gen-go/generator/generator.go

@@ -1237,9 +1237,8 @@ func (g *Generator) generate(file *FileDescriptor) {
 
 // Generate the header, including package definition
 func (g *Generator) generateHeader() {
-	g.P("// Code generated by protoc-gen-go.")
+	g.P("// Code generated by protoc-gen-go. DO NOT EDIT.")
 	g.P("// source: ", g.file.Name)
-	g.P("// DO NOT EDIT!")
 	g.P()
 
 	name := g.file.PackageName()