mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-03 20:31:23 +00:00
add command line argument for go namespace (#4222)
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
f2071e4f80
commit
b8f5f84437
@@ -90,6 +90,7 @@ std::string FlatCompiler::GetUsageString(const char* program_name) const {
|
||||
" T::c_str() and T::length() must be supported\n"
|
||||
" --no-js-exports Removes Node.js style export lines in JS.\n"
|
||||
" --goog-js-export Uses goog.exports* for closure compiler exporting in JS.\n"
|
||||
" --go-namespace Generate the overrided namespace in Golang.\n"
|
||||
" --raw-binary Allow binaries without file_indentifier to be read.\n"
|
||||
" This may crash flatc given a mismatched schema.\n"
|
||||
" --proto Input is a .proto, translate to .fbs.\n"
|
||||
@@ -160,6 +161,9 @@ int FlatCompiler::Compile(int argc, const char** argv) {
|
||||
opts.skip_js_exports = true;
|
||||
} else if(arg == "--goog-js-export") {
|
||||
opts.use_goog_js_export_format = true;
|
||||
} else if(arg == "--go-namespace") {
|
||||
if (++argi >= argc) Error("missing golang namespace" + arg, true);
|
||||
opts.go_namespace = argv[argi];
|
||||
} else if(arg == "--defaults-json") {
|
||||
opts.output_default_scalars_in_json = true;
|
||||
} else if (arg == "--unknown-json") {
|
||||
|
||||
Reference in New Issue
Block a user