mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-30 21:00:01 +00:00
Use enum types in generated read/mutate methods for Go (#4978)
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
7c3c027295
commit
a4c362a1ba
@@ -39,7 +39,7 @@ func (rcv *TableInFirstNS) FooTable(obj *TableInNestedNS) *TableInNestedNS {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (rcv *TableInFirstNS) FooEnum() int8 {
|
||||
func (rcv *TableInFirstNS) FooEnum() EnumInNestedNS {
|
||||
o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
|
||||
if o != 0 {
|
||||
return rcv._tab.GetInt8(o + rcv._tab.Pos)
|
||||
@@ -47,7 +47,7 @@ func (rcv *TableInFirstNS) FooEnum() int8 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (rcv *TableInFirstNS) MutateFooEnum(n int8) bool {
|
||||
func (rcv *TableInFirstNS) MutateFooEnum(n EnumInNestedNS) bool {
|
||||
return rcv._tab.MutateInt8Slot(6, n)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user