You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
389 B
13 lines
389 B
package flatbuffers |
|
|
|
// FlatBuffer is the interface that represents a flatbuffer. |
|
type FlatBuffer interface { |
|
Table() Table |
|
Init(buf []byte, i UOffsetT) |
|
} |
|
|
|
// GetRootAs is a generic helper to initialize a FlatBuffer with the provided buffer bytes and its data offset. |
|
func GetRootAs(buf []byte, offset UOffsetT, fb FlatBuffer) { |
|
n := GetUOffsetT(buf[offset:]) |
|
fb.Init(buf, n+offset) |
|
}
|
|
|