Commit 062dcf70 authored by kostya-sh's avatar kostya-sh Committed by Wouter van Oortmerssen

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\.$
parent ebb41006
...@@ -782,7 +782,7 @@ class GoGenerator : public BaseGenerator { ...@@ -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";
......
// automatically generated by the FlatBuffers compiler, do not modify // Code generated by the FlatBuffers compiler. DO NOT EDIT.
package Example package Example
......
// automatically generated by the FlatBuffers compiler, do not modify // Code generated by the FlatBuffers compiler. DO NOT EDIT.
package Example package Example
......
// automatically generated by the FlatBuffers compiler, do not modify // Code generated by the FlatBuffers compiler. DO NOT EDIT.
package Example package Example
......
// automatically generated by the FlatBuffers compiler, do not modify // Code generated by the FlatBuffers compiler. DO NOT EDIT.
package Example package Example
......
// automatically generated by the FlatBuffers compiler, do not modify // Code generated by the FlatBuffers compiler. DO NOT EDIT.
package Example package Example
......
// automatically generated by the FlatBuffers compiler, do not modify // Code generated by the FlatBuffers compiler. DO NOT EDIT.
package Example package Example
......
// automatically generated by the FlatBuffers compiler, do not modify // Code generated by the FlatBuffers compiler. DO NOT EDIT.
package Example package Example
......
// automatically generated by the FlatBuffers compiler, do not modify // Code generated by the FlatBuffers compiler. DO NOT EDIT.
package Example package Example
......
// automatically generated by the FlatBuffers compiler, do not modify // Code generated by the FlatBuffers compiler. DO NOT EDIT.
package Example package Example
......
// automatically generated by the FlatBuffers compiler, do not modify // Code generated by the FlatBuffers compiler. DO NOT EDIT.
package Example package Example
......
// automatically generated by the FlatBuffers compiler, do not modify // Code generated by the FlatBuffers compiler. DO NOT EDIT.
package Example2 package Example2
......
// automatically generated by the FlatBuffers compiler, do not modify // Code generated by the FlatBuffers compiler. DO NOT EDIT.
package MyGame package MyGame
......
// automatically generated by the FlatBuffers compiler, do not modify // Code generated by the FlatBuffers compiler. DO NOT EDIT.
package NamespaceB package NamespaceB
......
// automatically generated by the FlatBuffers compiler, do not modify // Code generated by the FlatBuffers compiler. DO NOT EDIT.
package NamespaceB package NamespaceB
......
// automatically generated by the FlatBuffers compiler, do not modify // Code generated by the FlatBuffers compiler. DO NOT EDIT.
package NamespaceB package NamespaceB
......
// automatically generated by the FlatBuffers compiler, do not modify // Code generated by the FlatBuffers compiler. DO NOT EDIT.
package NamespaceA package NamespaceA
......
// automatically generated by the FlatBuffers compiler, do not modify // Code generated by the FlatBuffers compiler. DO NOT EDIT.
package NamespaceA package NamespaceA
......
// automatically generated by the FlatBuffers compiler, do not modify // Code generated by the FlatBuffers compiler. DO NOT EDIT.
package NamespaceC package NamespaceC
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment