diff options
author | Somo <somombo@users.noreply.github.com> | 2020-01-16 19:19:00 -0500 |
---|---|---|
committer | Wouter van Oortmerssen <aardappel@gmail.com> | 2020-01-16 16:19:00 -0800 |
commit | bee1df96dcfa82d49e6c6289b87e957e83834036 (patch) | |
tree | e2b2c3ffea4be643f6096163f7cffc20e0e9d2b6 /tests/MyGame/Example/Stat.go | |
parent | 01189d7eddb6e55d3cd2874e88085a5c14c8ef89 (diff) | |
download | flatbuffers-bee1df96dcfa82d49e6c6289b87e957e83834036.tar.gz flatbuffers-bee1df96dcfa82d49e6c6289b87e957e83834036.tar.bz2 flatbuffers-bee1df96dcfa82d49e6c6289b87e957e83834036.zip |
[Go] Replace references to hardcoded ā€¯Monster" etc with idiomatic go 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
```
Diffstat (limited to 'tests/MyGame/Example/Stat.go')
-rw-r--r-- | tests/MyGame/Example/Stat.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/MyGame/Example/Stat.go b/tests/MyGame/Example/Stat.go index 9d052d8e..6034e01c 100644 --- a/tests/MyGame/Example/Stat.go +++ b/tests/MyGame/Example/Stat.go @@ -12,7 +12,7 @@ type StatT struct { Count uint16 } -func StatPack(builder *flatbuffers.Builder, t *StatT) flatbuffers.UOffsetT { +func (t *StatT) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT { if t == nil { return 0 } idOffset := builder.CreateString(t.Id) StatStart(builder) |