mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-10 23:17:27 +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,
|
||||
std::string *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";
|
||||
if (needs_imports) {
|
||||
code += "import (\n";
|
||||
|
||||
Reference in New Issue
Block a user