summaryrefslogtreecommitdiff
path: root/tests/MyGame/Example/Stat.go
diff options
context:
space:
mode:
authorSomo <somombo@users.noreply.github.com>2020-01-16 19:19:00 -0500
committerWouter van Oortmerssen <aardappel@gmail.com>2020-01-16 16:19:00 -0800
commitbee1df96dcfa82d49e6c6289b87e957e83834036 (patch)
treee2b2c3ffea4be643f6096163f7cffc20e0e9d2b6 /tests/MyGame/Example/Stat.go
parent01189d7eddb6e55d3cd2874e88085a5c14c8ef89 (diff)
downloadflatbuffers-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.go2
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)