* Add --go-module-name flag to support generating code for go modules
* Rename echo example folder
* Grammar
* Update readme for go-echo example
* Update readme for go-echo example
* Re-enable go modules after test is done
* Fix go generator undefined Package, also throw exception in specific examples.
* Add test for go generator import problem
* Add new version of generated go file. Fix conflict.
* Add executable permission to generate_code.py script.
* Improve test quality, remove unwanted generated files, better naming
* Fix comments
* clang format
Co-authored-by: Derek Bailey <derekbailey@google.com>
* [go] always write required types
* support optional scalars in go
* generate optional_scalars and monster_test
* restore original behavior for non-optional scalars
* add tests
* tests/GoTest.sh: Fix flags.Parse location to work on new go SDKs.
Calling flags.Parse() within init() races with other packages which register
flags in their init(), and in particular with the testing package itself. It is
more reliable to call flags.Parse() from a TestMain implementation.
See https://github.com/golang/go/issues/31859,
https://github.com/golang/go/issues/33869.
* .github: Enable build-go action in build.yaml workflow.
When running GoTest.sh, the last step that checking go format files
are print \n instead of new line:
These files are not well gofmt'ed:\n\nMyGame/Example/Color.go
MyGame/Example/MonsterStorage_grpc.go
This changes fix it by echo NOT_FMT_FILES in separate line.
Track and emit required FlatBuffers namespace imports in generated Go code.
Update Go code generator by moving most functionality into the generator class, to facilitate namespace tracking. (Note that the git diff in this combined commit may appear large due to this refactoring, but very little code was actually changed.)
Update Go code generator by tracking namespace imports when generating FlatBuffers code.
Update Go code generator by emitting package imports to correctly reference code in other FlatBuffers namespaces.
Create Go test that checks the usage of InParentNamespace objects (as defined in the example schema).
Create Docker test that checks the Go language port.
Fixes#4883Fixes#3927
Individual commits:
* remove "static" from soon-to-be method functions
* move almost all functions into class as methods
* set current namespace and emit package names if needed
* track imported namespaces
* parent namespaces work
* docker test for go ^1.11
* update base image name for go docker test
* remove cerr debugging
* formatting fixes
* re-run generate_code.sh
* explicitly test namespace imports and usage
This is something the format supports, but none of the builders
were doing. Can save 10-20% on FlatBuffer binary size!
Also fixed the Go tests.
Change-Id: I616c56ce9bbcfcaee23aa24f0532fcb60b6a8c75
Tested: on Linux.
Changing to keep include prefixes had two side effects: the main
file being parsed wasn't filtered out anymore, and include directory
paths would be added to the path in the include statement.
Also moved the include_test*.fbs files to sub directories so we
can actually test the handling of -I etc.
tested: on Linux.
Change-Id: Ibae095cea7ab0cccbac15cfb5171719f6b5cad8c
Builder has a new CreateByteString function that writes a
null-terimnated byte slice to the buffer. This results in zero
allocations for writing strings.
Also fixed Go unit tests not being up to date with recent schema
changes.
Change-Id: I42e619f9c5ea05f6f937c68a5c8a92462c46bce3
Tested: on Linux and Windows.
Include C# codegen in flatc and .NET FlatBuffer access via the
FlatBufferBuilder class
Tested: on Windows.
Change-Id: If5228a8df60a10e0751b245c6c64530264ea2d8a
Add more comments explaining the tests. Remove the extraneous 'superFuzz'
functionality. By default, do not compare to generated Java files.
Change-Id: Icb0aa8262e10035958639f9a88ca666694a2ce73
Implement code generation and runtime library for Go, derived from the
Java implementation. Additionally, the test suite verifies:
- the exact bytes in the Builder buffer during object construction,
- vtable deduplication, and
- table construction, via a fuzzer derived from the C++ implementation.
Change-Id: Ib95a019c684891def2b50281e570b4843fea7baa