summaryrefslogtreecommitdiff
path: root/tests/namespace_test/NamespaceA/NamespaceB/StructInNestedNS.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/namespace_test/NamespaceA/NamespaceB/StructInNestedNS.go')
-rw-r--r--tests/namespace_test/NamespaceA/NamespaceB/StructInNestedNS.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/namespace_test/NamespaceA/NamespaceB/StructInNestedNS.go b/tests/namespace_test/NamespaceA/NamespaceB/StructInNestedNS.go
index e985fbf7..fe9255e3 100644
--- a/tests/namespace_test/NamespaceA/NamespaceB/StructInNestedNS.go
+++ b/tests/namespace_test/NamespaceA/NamespaceB/StructInNestedNS.go
@@ -6,6 +6,27 @@ import (
flatbuffers "github.com/google/flatbuffers/go"
)
+type StructInNestedNST struct {
+ A int32
+ B int32
+}
+
+func StructInNestedNSPack(builder *flatbuffers.Builder, t *StructInNestedNST) flatbuffers.UOffsetT {
+ if t == nil { return 0 }
+ return CreateStructInNestedNS(builder, t.A, t.B)
+}
+func (rcv *StructInNestedNS) UnPackTo(t *StructInNestedNST) {
+ t.A = rcv.A()
+ t.B = rcv.B()
+}
+
+func (rcv *StructInNestedNS) UnPack() *StructInNestedNST {
+ if rcv == nil { return nil }
+ t := &StructInNestedNST{}
+ rcv.UnPackTo(t)
+ return t
+}
+
type StructInNestedNS struct {
_tab flatbuffers.Struct
}