Support file_identifier in Go (#7904)

Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
Jeroen Demeyer
2023-04-26 07:15:09 +02:00
committed by GitHub
parent 56ecc1f548
commit 63495b935a
13 changed files with 203 additions and 16 deletions

View File

@@ -49,6 +49,10 @@ func GetRootAsStat(buf []byte, offset flatbuffers.UOffsetT) *Stat {
return x
}
func FinishStatBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
builder.Finish(offset)
}
func GetSizePrefixedRootAsStat(buf []byte, offset flatbuffers.UOffsetT) *Stat {
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
x := &Stat{}
@@ -56,6 +60,10 @@ func GetSizePrefixedRootAsStat(buf []byte, offset flatbuffers.UOffsetT) *Stat {
return x
}
func FinishSizePrefixedStatBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
builder.FinishSizePrefixed(offset)
}
func (rcv *Stat) Init(buf []byte, i flatbuffers.UOffsetT) {
rcv._tab.Bytes = buf
rcv._tab.Pos = i