mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-13 16:15:26 +00:00
Make most of the Go code comply with gofmt (except enums).
Enums are not fixed because depending on they have comments or not they will be aligned alogn the asssignment character.
This commit is contained in:
@@ -5,6 +5,7 @@ package Example
|
||||
import (
|
||||
flatbuffers "github.com/google/flatbuffers/go"
|
||||
)
|
||||
|
||||
type TestSimpleTableWithEnum struct {
|
||||
_tab flatbuffers.Table
|
||||
}
|
||||
@@ -12,7 +13,7 @@ type TestSimpleTableWithEnum struct {
|
||||
func GetRootAsTestSimpleTableWithEnum(buf []byte, offset flatbuffers.UOffsetT) *TestSimpleTableWithEnum {
|
||||
n := flatbuffers.GetUOffsetT(buf[offset:])
|
||||
x := &TestSimpleTableWithEnum{}
|
||||
x.Init(buf, n + offset)
|
||||
x.Init(buf, n+offset)
|
||||
return x
|
||||
}
|
||||
|
||||
@@ -33,6 +34,12 @@ func (rcv *TestSimpleTableWithEnum) MutateColor(n int8) bool {
|
||||
return rcv._tab.MutateInt8Slot(4, n)
|
||||
}
|
||||
|
||||
func TestSimpleTableWithEnumStart(builder *flatbuffers.Builder) { builder.StartObject(1) }
|
||||
func TestSimpleTableWithEnumAddColor(builder *flatbuffers.Builder, color int8) { builder.PrependInt8Slot(0, color, 2) }
|
||||
func TestSimpleTableWithEnumEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { return builder.EndObject() }
|
||||
func TestSimpleTableWithEnumStart(builder *flatbuffers.Builder) {
|
||||
builder.StartObject(1)
|
||||
}
|
||||
func TestSimpleTableWithEnumAddColor(builder *flatbuffers.Builder, color int8) {
|
||||
builder.PrependInt8Slot(0, color, 2)
|
||||
}
|
||||
func TestSimpleTableWithEnumEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
||||
return builder.EndObject()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user