Documentation
¶
Index ¶
- Constants
- type AliasContainer
- type ArrayConstants
- type Block
- type ConvertErr
- type ConvertErrVal
- type ConvertIntf
- type ConvertIntfVal
- type ConvertString
- type ConvertStringMapValue
- type ConvertStringSlice
- type ConvertStringVal
- type Custom
- type CustomBytes
- type CustomInt
- type Embedded
- type FastAlias
- type FileHandle
- type Files
- type Fixed
- type Insane
- type IntA
- type IntB
- type IntC
- type Issue102
- type Issue102MapUsesTuple
- type Issue102Tuple
- type Issue102TupleDeep
- type Issue102TupleUsesMap
- type Issue102TupleUsesTuple
- type Issue102Uses
- type Issue102deep
- type Issue191
- type MyEnum
- type NonMsgStructTags
- type Object
- type SpecialID
- type T
- type TestBench
- type TestFast
- type TestHidden
- type TestObj
- type TestType
- type Things
- type Tree
- type Wrapper
- type X
Constants ¶
View Source
const ( ConstantInt int = 8 ConstantInt8 int8 = 8 ConstantInt16 int16 = 8 ConstantInt32 int32 = 8 ConstantInt64 int64 = 8 ConstantUint uint = 8 ConstantUint8 uint8 = 8 ConstantUint16 uint16 = 8 ConstantUint32 uint32 = 8 ConstantUint64 uint64 = 8 )
Ensure all different widths of integer can be used as constant keys.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AliasContainer ¶
type AliasContainer struct {
Fast FastAlias
}
type ArrayConstants ¶ added in v1.0.3
type ArrayConstants struct {
ConstantInt [ConstantInt]string
ConstantInt8 [ConstantInt8]string
ConstantInt16 [ConstantInt16]string
ConstantInt32 [ConstantInt32]string
ConstantInt64 [ConstantInt64]string
ConstantUint [ConstantUint]string
ConstantUint8 [ConstantUint8]string
ConstantUint16 [ConstantUint16]string
ConstantUint32 [ConstantUint32]string
ConstantUint64 [ConstantUint64]string
ConstantHex [0x16]string
ConstantOctal [07]string
}
type ConvertErr ¶ added in v1.0.3
type ConvertErr struct {
Err ConvertErrVal
}
type ConvertErrVal ¶ added in v1.0.3
type ConvertErrVal string
type ConvertIntf ¶ added in v1.0.3
type ConvertIntf struct {
Intf ConvertIntfVal
}
type ConvertIntfVal ¶ added in v1.0.3
type ConvertIntfVal struct {
Test string
}
type ConvertString ¶ added in v1.0.3
type ConvertString struct {
String ConvertStringVal
}
type ConvertStringMapValue ¶ added in v1.0.3
type ConvertStringMapValue struct {
Strings map[string]ConvertStringVal
}
type ConvertStringSlice ¶ added in v1.0.3
type ConvertStringSlice struct {
Strings []ConvertStringVal
}
type ConvertStringVal ¶ added in v1.0.3
type ConvertStringVal string
type Custom ¶
type Custom struct {
Bts CustomBytes `msg:"bts"`
Mp map[string]*Embedded `msg:"mp"`
Enums []MyEnum `msg:"enums"` // test explicit enum shim
Some FileHandle `msg:file_handle`
}
type CustomBytes ¶
type CustomBytes []byte
type FileHandle ¶
type Issue102MapUsesTuple ¶ added in v1.0.3
type Issue102MapUsesTuple struct {
Nested Issue102Tuple
NestedPtr *Issue102Tuple
}
type Issue102Tuple ¶ added in v1.0.3
type Issue102Tuple struct{}
type Issue102TupleDeep ¶ added in v1.0.3
type Issue102TupleUsesMap ¶ added in v1.0.3
type Issue102TupleUsesTuple ¶ added in v1.0.3
type Issue102TupleUsesTuple struct {
Nested Issue102Tuple
NestedPtr *Issue102Tuple
}
type Issue102Uses ¶ added in v1.0.3
type Issue102deep ¶ added in v1.0.3
type NonMsgStructTags ¶ added in v1.0.3
type TestHidden ¶
type TestType ¶
type TestType struct {
F *float64 `msg:"float"`
Els map[string]string `msg:"elements"`
Obj struct {
ValueA string `msg:"value_a"`
ValueB []byte `msg:"value_b"`
} `msg:"object"`
Child *TestType `msg:"child"`
Time time.Time `msg:"time"`
Any interface{} `msg:"any"`
Appended msgp.Raw `msg:"appended"`
Num msgp.Number `msg:"num"`
Byte byte
Rune rune
RunePtr *rune
RunePtrPtr **rune
RuneSlice []rune
Slice1 []string
Slice2 []string
SlicePtr *[]string
}
type Things ¶
type Things struct {
Cmplx complex64 `msg:"complex"` // test slices
Vals []int32 `msg:"values"`
Arr [msgp.ExtensionPrefixSize]float64 `msg:"arr"` // test const array and *ast.SelectorExpr as array size
Arr2 [4]float64 `msg:"arr2"` // test basic lit array
Ext *msgp.RawExtension `msg:"ext,extension"` // test extension
Oext msgp.RawExtension `msg:"oext,extension"` // test extension reference
}
type X ¶
type X struct {
Values [32]byte // should compile to 32*msgp.ByteSize; encoded as Bin
ValuesPtr *[32]byte // check (*)[:] deref
More Block // should be identical to the above
Others [][32]int32 // should compile to len(x.Others)*32*msgp.Int32Size
Matrix [][]int32 // should not optimize
ManyFixed []Fixed
}
tests edge-cases with compiling size compilation.
Click to show internal directories.
Click to hide internal directories.