mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-30 18:50:01 +00:00
Use standard header for generated Go files (#4961)
As recommended by https://golang.org/pkg/cmd/go/internal/generate/: To convey to humans and machine tools that code is generated, generated source should have a line early in the file that matches the following regular expression (in Go syntax): ^// Code generated .* DO NOT EDIT\.$
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
ebb410062b
commit
062dcf7007
@@ -782,7 +782,7 @@ class GoGenerator : public BaseGenerator {
|
|||||||
void BeginFile(const std::string name_space_name, const bool needs_imports,
|
void BeginFile(const std::string name_space_name, const bool needs_imports,
|
||||||
std::string *code_ptr) {
|
std::string *code_ptr) {
|
||||||
std::string &code = *code_ptr;
|
std::string &code = *code_ptr;
|
||||||
code = code + "// " + FlatBuffersGeneratedWarning() + "\n\n";
|
code = code + "// Code generated by the FlatBuffers compiler. DO NOT EDIT.\n\n";
|
||||||
code += "package " + name_space_name + "\n\n";
|
code += "package " + name_space_name + "\n\n";
|
||||||
if (needs_imports) {
|
if (needs_imports) {
|
||||||
code += "import (\n";
|
code += "import (\n";
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
package Example
|
package Example
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
package Example
|
package Example
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
package Example
|
package Example
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
package Example
|
package Example
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
package Example
|
package Example
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
package Example
|
package Example
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
package Example
|
package Example
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
package Example
|
package Example
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
package Example
|
package Example
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
package Example
|
package Example
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
package Example2
|
package Example2
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
package MyGame
|
package MyGame
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
package NamespaceB
|
package NamespaceB
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
package NamespaceB
|
package NamespaceB
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
package NamespaceB
|
package NamespaceB
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
package NamespaceA
|
package NamespaceA
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
package NamespaceA
|
package NamespaceA
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
package NamespaceC
|
package NamespaceC
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user