Use enum types in generated read/mutate methods for Go (#4978)

This commit is contained in:
kostya-sh
2018-10-08 22:25:37 +01:00
committed by Wouter van Oortmerssen
parent 7c3c027295
commit a4c362a1ba
6 changed files with 16 additions and 9 deletions

View File

@@ -156,6 +156,10 @@ func CheckReadBuffer(buf []byte, offset flatbuffers.UOffsetT, fail func(string,
fail(FailString("name", "MyMonster", got))
}
if got := monster.Color(); example.ColorBlue != got {
fail(FailString("color", example.ColorBlue, got))
}
// initialize a Vec3 from Pos()
vec := new(example.Vec3)
vec = monster.Pos(vec)