mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-07 05:47:36 +00:00
Go: make generated code more compliant to "go fmt" (#7907)
Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
@@ -13,7 +13,9 @@ type StructOfStructsT struct {
|
||||
}
|
||||
|
||||
func (t *StructOfStructsT) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
||||
if t == nil { return 0 }
|
||||
if t == nil {
|
||||
return 0
|
||||
}
|
||||
return CreateStructOfStructs(builder, t.A.Id, t.A.Distance, t.B.A, t.B.B, t.C.Id, t.C.Distance)
|
||||
}
|
||||
func (rcv *StructOfStructs) UnPackTo(t *StructOfStructsT) {
|
||||
@@ -23,7 +25,9 @@ func (rcv *StructOfStructs) UnPackTo(t *StructOfStructsT) {
|
||||
}
|
||||
|
||||
func (rcv *StructOfStructs) UnPack() *StructOfStructsT {
|
||||
if rcv == nil { return nil }
|
||||
if rcv == nil {
|
||||
return nil
|
||||
}
|
||||
t := &StructOfStructsT{}
|
||||
rcv.UnPackTo(t)
|
||||
return t
|
||||
|
||||
Reference in New Issue
Block a user