mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-14 16:36:55 +00:00
[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 ```
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
01189d7edd
commit
bee1df96dc
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user