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 StructOfStructsOfStructsT struct {
}
func (t *StructOfStructsOfStructsT) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
if t == nil { return 0 }
if t == nil {
return 0
}
return CreateStructOfStructsOfStructs(builder, t.A.A.Id, t.A.A.Distance, t.A.B.A, t.A.B.B, t.A.C.Id, t.A.C.Distance)
}
func (rcv *StructOfStructsOfStructs) UnPackTo(t *StructOfStructsOfStructsT) {
@@ -19,7 +21,9 @@ func (rcv *StructOfStructsOfStructs) UnPackTo(t *StructOfStructsOfStructsT) {
}
func (rcv *StructOfStructsOfStructs) UnPack() *StructOfStructsOfStructsT {
if rcv == nil { return nil }
if rcv == nil {
return nil
}
t := &StructOfStructsOfStructsT{}
rcv.UnPackTo(t)
return t