summaryrefslogtreecommitdiff
path: root/tests/MyGame/Example/TestSimpleTableWithEnum.go
AgeCommit message (Collapse)AuthorFilesLines
2020-11-05Support size-prefixed buffers and add tests for size-prefixed messages (#6232)Charlie Yin1-0/+7
2020-01-16[Go] Replace references to hardcoded ”Monster" etc with idiomatic go ↵Somo1-1/+1
wherever possible (#5716) * go: replace objAPI-generated Pack func with method See discussion at https://github.com/google/flatbuffers/issues/5668 * go: replace generated union type UnPack func with method Similar to discussion https://github.com/google/flatbuffers/issues/5668 But signature: ``` func AnyUnPack(t Any, table flatbuffers.Table) *AnyT ``` Becomes, ``` func (rcv Any) UnPack(table flatbuffers.Table) *AnyT ```
2019-11-04[Go] Add UnPackTo functions (#5598)Lawrence Chan1-1/+5
2019-10-31[Go] Object API support (#5339)iceboy1-0/+18
* start * works for current usages! * unpack: vector of struct * optimize byte slice * support nested struct * support null table * support struct * support union * update generated code * grumble * fix compiler warning * update generated code * wrap type in namespace * bug * wrap in namespace * enum byte arrays * generate struct for unions * basic testing * remove branching * fix assert * pack vector of fixed structs correctly * omit null vectors * Refactor Union Pack and UnPack methods Remove append usage to increase code efficiency when dealing with large vectors * generate goldens
2019-05-20[Go] Change two more sites to use enum types (#5359)David Reiss1-2/+2
Fixes #5357 (regression introduced by #5235)
2019-05-17[Go] Make enums into real types, add String() (#5235)David Reiss1-2/+2
* [Go] Make enums into real types, add String() This changes the generated code for enums: instead of type aliases, they're now distinct types, allowing for better type-checking. Some client code may have to be changed to add casts. Enum types now have a String() method, so they implement fmt.Stringer. An EnumValues map is now generated, in addition to the existing EnumNames map, to easily map strings to values. Generated enum files are now gofmt-clean. Fixes #5207 * use example.ColorGreen explicitly * use valid enum value in mutation test, add new test for "invalid" enum * add length check and comment
2019-05-09Make Monster's Color unsigned (#5318)Vladimir Glavnyy1-4/+4
- update C++ monster_test::Color to unsigned type - update Go Color:ubyte in the go_test.go - add workaround for unsigned enum in java test - sync generate.bat and generate.sh
2018-10-08Use enum types in generated read/mutate methods for Go (#4978)kostya-sh1-2/+2
2018-10-03Use standard header for generated Go files (#4961)kostya-sh1-1/+1
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\.$
2016-08-23Add a generic way to deserialize a flatbuffer in Go.gonzaloserrano1-0/+4
Similar to what protobufs does with its `Message` interface, introduce here such interface and create a generic `GetRootAs` method to deserialize a flatbuffer.
2016-08-02Make most of the Go code comply with gofmt (except enums).gonzaloserrano1-4/+11
Enums are not fixed because depending on they have comments or not they will be aligned alogn the asssignment character.
2016-07-22Merge pull request #363 from danring/fix-341Robert1-0/+7
Emit GetRootAs methods for all types in Go and Python
2016-07-20Implement mutators for GoMuhammed Thanish1-0/+4
2016-06-14Emit GetRootAs methods for all types in Go and PythonDan Ring1-0/+7
2016-05-26sharing the Flatbuffers warninglakedaemon1-1/+1
2015-08-11[Issue 252] Add type cast for default enum values in C#Mormegil1-0/+27
When creating a “CreateXxx(...)” method for a “simple table” type, enum-type fields with a non-zero default must have an explicit cast for the respective argument default value, because in C#, there is an implicit cast from int to an enum only for 0. Also, added an example of such type into the example monster_test type, so that we test this feature.