mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-20 07:15:07 +00:00
[Go] Add UnPackTo functions (#5598)
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
32254b7acd
commit
964365ba69
@@ -17,10 +17,14 @@ func TestSimpleTableWithEnumPack(builder *flatbuffers.Builder, t *TestSimpleTabl
|
||||
return TestSimpleTableWithEnumEnd(builder)
|
||||
}
|
||||
|
||||
func (rcv *TestSimpleTableWithEnum) UnPackTo(t *TestSimpleTableWithEnumT) {
|
||||
t.Color = rcv.Color()
|
||||
}
|
||||
|
||||
func (rcv *TestSimpleTableWithEnum) UnPack() *TestSimpleTableWithEnumT {
|
||||
if rcv == nil { return nil }
|
||||
t := &TestSimpleTableWithEnumT{}
|
||||
t.Color = rcv.Color()
|
||||
rcv.UnPackTo(t)
|
||||
return t
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user