Documentation ¶
Overview ¶
Package test contains data structures for testing the go_marshal tool.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InetAddr ¶
type InetAddr [4]byte
InetAddr is an example marshallable newtype on an array.
+marshal boundCheck
type SignalSet ¶
type SignalSet uint64
SignalSet is an example marshallable newtype on a primitive.
+marshal slice:SignalSetSlice:inner boundCheck
type SignalSetAlias ¶
type SignalSetAlias SignalSet
SignalSetAlias is an example newtype on another marshallable type.
+marshal slice:SignalSetAliasSlice
type Stat ¶
type Stat struct { Dev uint64 Ino uint64 Nlink uint64 Mode uint32 UID uint32 GID uint32 Rdev uint64 Size int64 Blksize int64 Blocks int64 ATime Timespec MTime Timespec CTime Timespec // contains filtered or unexported fields }
Stat represents struct stat.
+marshal slice:StatSlice
type TestArray ¶
type TestArray [sizeA]int32
TestArray is a test data structure on an array with a constant length.
+marshal
type TestArray2 ¶
type TestArray2 [sizeA * sizeB]int32
TestArray2 is a newtype on an array with a simple arithmetic expression of constants for the array length.
+marshal
type TestArray3 ¶
type TestArray3 [sizeA*sizeB + 12]int32
TestArray3 is a newtype on an array with a simple arithmetic expression of mixed constants and literals for the array length.
+marshal
type Type1 ¶
type Type1 struct {
// contains filtered or unexported fields
}
Type1 is a test data type.
+marshal slice:Type1Slice
type Type10 ¶
type Type10 struct { Type10Embed // contains filtered or unexported fields }
Type10 is a test data type which contains an embedded struct.
+marshal
type Type10Embed ¶
type Type10Embed struct {
// contains filtered or unexported fields
}
Type10Embed is a test data type which is be embedded into another type.
+marshal
type Type11 ¶
Type11 is a test data type which contains an embedded struct from an external package.
+marshal
type Type12Dynamic ¶
Type12Dynamic is a dynamically sized struct which depends on the autogenerator to generate some Marshallable methods for it.
+marshal dynamic
func (*Type12Dynamic) MarshalBytes ¶
func (t *Type12Dynamic) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*Type12Dynamic) SizeBytes ¶
func (t *Type12Dynamic) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*Type12Dynamic) UnmarshalBytes ¶
func (t *Type12Dynamic) UnmarshalBytes(src []byte) []byte
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
type Type13Dynamic ¶
type Type13Dynamic string
Type13Dynamic is a dynamically sized struct which depends on the autogenerator to generate some Marshallable methods for it.
It represents a string in memory which is preceded by a uint32 indicating the string size.
+marshal dynamic
func (*Type13Dynamic) MarshalBytes ¶
func (t *Type13Dynamic) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*Type13Dynamic) SizeBytes ¶
func (t *Type13Dynamic) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*Type13Dynamic) UnmarshalBytes ¶
func (t *Type13Dynamic) UnmarshalBytes(src []byte) []byte
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
type Type2 ¶
type Type2 struct {
// contains filtered or unexported fields
}
Type2 is a test data type.
+marshal boundCheck
type Type3 ¶
type Type3 struct {
// contains filtered or unexported fields
}
Type3 is a test data type.
+marshal
type Type4 ¶
type Type4 struct {
// contains filtered or unexported fields
}
Type4 is a test data type.
+marshal
type Type5 ¶
type Type5 struct {
// contains filtered or unexported fields
}
Type5 is a test data type.
+marshal
type Type6 ¶
type Type6 struct {
// contains filtered or unexported fields
}
Type6 is a test data type ends mid-word.
+marshal
type Type7 ¶
type Type7 struct {
// contains filtered or unexported fields
}
Type7 is a test data type that contains a child struct that ends mid-word. +marshal