Go: make generated code more compliant to "go fmt" (#7907)

Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
Jeroen Demeyer
2023-04-26 07:19:07 +02:00
committed by GitHub
parent 63495b935a
commit 6c8a8d054d
19 changed files with 143 additions and 79 deletions

View File

@@ -11,7 +11,9 @@ type TestSimpleTableWithEnumT struct {
}
func (t *TestSimpleTableWithEnumT) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
if t == nil { return 0 }
if t == nil {
return 0
}
TestSimpleTableWithEnumStart(builder)
TestSimpleTableWithEnumAddColor(builder, t.Color)
return TestSimpleTableWithEnumEnd(builder)
@@ -22,7 +24,9 @@ func (rcv *TestSimpleTableWithEnum) UnPackTo(t *TestSimpleTableWithEnumT) {
}
func (rcv *TestSimpleTableWithEnum) UnPack() *TestSimpleTableWithEnumT {
if rcv == nil { return nil }
if rcv == nil {
return nil
}
t := &TestSimpleTableWithEnumT{}
rcv.UnPackTo(t)
return t