Documentation ¶
Index ¶
- Constants
- type AliasContainer
- type AllowNil0
- type AllowNil1
- type AllowNil10
- type AllowNilHalfFull
- type AllowNilLotsOFields
- type AllowNilOmitEmpty
- type AllowNilOmitEmpty2
- type ArrayConstants
- type Block
- type Common
- type ConvertErr
- type ConvertErrVal
- type ConvertIntf
- type ConvertIntfVal
- type ConvertString
- type ConvertStringMapValue
- type ConvertStringSlice
- type ConvertStringVal
- type Custom
- type CustomBytes
- type CustomInt
- type EmbeddableStruct
- type EmbeddableStruct2
- type EmbeddableStruct2AN
- type EmbeddableStructAN
- type Embedded
- type ErrorCtxAsMap
- type ErrorCtxAsTuple
- type ErrorCtxMapChild
- type ErrorCtxMapChildNotInline
- type ErrorCtxTupleChild
- type ErrorCtxTupleChildNotInline
- type FastAlias
- type FileHandle
- type Files
- type Fixed
- type Foo
- type GetUserRequest
- type GetUserRequestWithEmbeddedStruct
- 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 NamedBool
- type NamedFloat64
- type NamedInt
- type NamedString
- type NamedStruct
- type NamedStructAN
- type NonMsgStructTags
- type NotAllowNil10
- type NotOmitEmpty10
- type Object
- type OmitEmpty0
- type OmitEmpty10
- type OmitEmptyHalfFull
- type OmitEmptyLotsOFields
- 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 AllowNil0 ¶ added in v1.1.7
type AllowNil0 struct { ABool bool `msg:"abool,allownil"` AInt int `msg:"aint,allownil"` AInt8 int8 `msg:"aint8,allownil"` AInt16 int16 `msg:"aint16,allownil"` AInt32 int32 `msg:"aint32,allownil"` AInt64 int64 `msg:"aint64,allownil"` AUint uint `msg:"auint,allownil"` AUint8 uint8 `msg:"auint8,allownil"` AUint16 uint16 `msg:"auint16,allownil"` AUint32 uint32 `msg:"auint32,allownil"` AUint64 uint64 `msg:"auint64,allownil"` AFloat32 float32 `msg:"afloat32,allownil"` AFloat64 float64 `msg:"afloat64,allownil"` AComplex64 complex64 `msg:"acomplex64,allownil"` AComplex128 complex128 `msg:"acomplex128,allownil"` ANamedBool bool `msg:"anamedbool,allownil"` ANamedInt int `msg:"anamedint,allownil"` ANamedFloat64 float64 `msg:"anamedfloat64,allownil"` AMapStrStr map[string]string `msg:"amapstrstr,allownil"` APtrNamedStr *NamedString `msg:"aptrnamedstr,allownil"` AString string `msg:"astring,allownil"` ANamedString string `msg:"anamedstring,allownil"` AByteSlice []byte `msg:"abyteslice,allownil"` ASliceString []string `msg:"aslicestring,allownil"` ASliceNamedString []NamedString `msg:"aslicenamedstring,allownil"` ANamedStruct NamedStructAN `msg:"anamedstruct,allownil"` APtrNamedStruct *NamedStructAN `msg:"aptrnamedstruct,allownil"` AUnnamedStruct struct { A string `msg:"a,allownil"` } `msg:"aunnamedstruct,allownil"` // allownil not supported on unnamed struct EmbeddableStructAN `msg:",flatten,allownil"` // embed flat EmbeddableStruct2AN `msg:"embeddablestruct2,allownil"` // embed non-flat AArrayInt [5]int `msg:"aarrayint,allownil"` // not supported ATime time.Time `msg:"atime,allownil"` }
type AllowNil1 ¶ added in v1.1.7
type AllowNil1 struct { ABool []bool `msg:"abool,allownil"` AInt []int `msg:"aint,allownil"` AInt8 []int8 `msg:"aint8,allownil"` AInt16 []int16 `msg:"aint16,allownil"` AInt32 []int32 `msg:"aint32,allownil"` AInt64 []int64 `msg:"aint64,allownil"` AUint []uint `msg:"auint,allownil"` AUint8 []uint8 `msg:"auint8,allownil"` AUint16 []uint16 `msg:"auint16,allownil"` AUint32 []uint32 `msg:"auint32,allownil"` AUint64 []uint64 `msg:"auint64,allownil"` AFloat32 []float32 `msg:"afloat32,allownil"` AFloat64 []float64 `msg:"afloat64,allownil"` AComplex64 []complex64 `msg:"acomplex64,allownil"` AComplex128 []complex128 `msg:"acomplex128,allownil"` ANamedBool []bool `msg:"anamedbool,allownil"` ANamedInt []int `msg:"anamedint,allownil"` ANamedFloat64 []float64 `msg:"anamedfloat64,allownil"` AMapStrStr map[string]string `msg:"amapstrstr,allownil"` APtrNamedStr *NamedString `msg:"aptrnamedstr,allownil"` AString []string `msg:"astring,allownil"` ANamedString []string `msg:"anamedstring,allownil"` AByteSlice []byte `msg:"abyteslice,allownil"` ASliceString []string `msg:"aslicestring,allownil"` ASliceNamedString []NamedString `msg:"aslicenamedstring,allownil"` ANamedStruct NamedStructAN `msg:"anamedstruct,allownil"` APtrNamedStruct *NamedStructAN `msg:"aptrnamedstruct,allownil"` AUnnamedStruct struct { A []string `msg:"a,allownil"` } `msg:"aunnamedstruct,allownil"` *EmbeddableStructAN `msg:",flatten,allownil"` // embed flat *EmbeddableStruct2AN `msg:"embeddablestruct2,allownil"` // embed non-flat AArrayInt [5]int `msg:"aarrayint,allownil"` // not supported ATime *time.Time `msg:"atime,allownil"` }
type AllowNil10 ¶ added in v1.1.7
type AllowNil10 struct { Field00 []string `msg:"field00,allownil"` Field01 []string `msg:"field01,allownil"` Field02 []string `msg:"field02,allownil"` Field03 []string `msg:"field03,allownil"` Field04 []string `msg:"field04,allownil"` Field05 []string `msg:"field05,allownil"` Field06 []string `msg:"field06,allownil"` Field07 []string `msg:"field07,allownil"` Field08 []string `msg:"field08,allownil"` Field09 []string `msg:"field09,allownil"` }
type AllowNilHalfFull ¶ added in v1.1.7
type AllowNilLotsOFields ¶ added in v1.1.7
type AllowNilLotsOFields struct { Field00 []string `msg:"field00,allownil"` Field01 []string `msg:"field01,allownil"` Field02 []string `msg:"field02,allownil"` Field03 []string `msg:"field03,allownil"` Field04 []string `msg:"field04,allownil"` Field05 []string `msg:"field05,allownil"` Field06 []string `msg:"field06,allownil"` Field07 []string `msg:"field07,allownil"` Field08 []string `msg:"field08,allownil"` Field09 []string `msg:"field09,allownil"` Field10 []string `msg:"field10,allownil"` Field11 []string `msg:"field11,allownil"` Field12 []string `msg:"field12,allownil"` Field13 []string `msg:"field13,allownil"` Field14 []string `msg:"field14,allownil"` Field15 []string `msg:"field15,allownil"` Field16 []string `msg:"field16,allownil"` Field17 []string `msg:"field17,allownil"` Field18 []string `msg:"field18,allownil"` Field19 []string `msg:"field19,allownil"` Field20 []string `msg:"field20,allownil"` Field21 []string `msg:"field21,allownil"` Field22 []string `msg:"field22,allownil"` Field23 []string `msg:"field23,allownil"` Field24 []string `msg:"field24,allownil"` Field25 []string `msg:"field25,allownil"` Field26 []string `msg:"field26,allownil"` Field27 []string `msg:"field27,allownil"` Field28 []string `msg:"field28,allownil"` Field29 []string `msg:"field29,allownil"` Field30 []string `msg:"field30,allownil"` Field31 []string `msg:"field31,allownil"` Field32 []string `msg:"field32,allownil"` Field33 []string `msg:"field33,allownil"` Field34 []string `msg:"field34,allownil"` Field35 []string `msg:"field35,allownil"` Field36 []string `msg:"field36,allownil"` Field37 []string `msg:"field37,allownil"` Field38 []string `msg:"field38,allownil"` Field39 []string `msg:"field39,allownil"` Field40 []string `msg:"field40,allownil"` Field41 []string `msg:"field41,allownil"` Field42 []string `msg:"field42,allownil"` Field43 []string `msg:"field43,allownil"` Field44 []string `msg:"field44,allownil"` Field45 []string `msg:"field45,allownil"` Field46 []string `msg:"field46,allownil"` Field47 []string `msg:"field47,allownil"` Field48 []string `msg:"field48,allownil"` Field49 []string `msg:"field49,allownil"` Field50 []string `msg:"field50,allownil"` Field51 []string `msg:"field51,allownil"` Field52 []string `msg:"field52,allownil"` Field53 []string `msg:"field53,allownil"` Field54 []string `msg:"field54,allownil"` Field55 []string `msg:"field55,allownil"` Field56 []string `msg:"field56,allownil"` Field57 []string `msg:"field57,allownil"` Field58 []string `msg:"field58,allownil"` Field59 []string `msg:"field59,allownil"` Field60 []string `msg:"field60,allownil"` Field61 []string `msg:"field61,allownil"` Field62 []string `msg:"field62,allownil"` Field63 []string `msg:"field63,allownil"` Field64 []string `msg:"field64,allownil"` Field65 []string `msg:"field65,allownil"` Field66 []string `msg:"field66,allownil"` Field67 []string `msg:"field67,allownil"` Field68 []string `msg:"field68,allownil"` Field69 []string `msg:"field69,allownil"` }
type AllowNilOmitEmpty ¶ added in v1.1.7
type AllowNilOmitEmpty2 ¶ added in v1.1.7
type ArrayConstants ¶ added in v1.1.0
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.1.0
type ConvertErr struct {
Err ConvertErrVal
}
type ConvertErrVal ¶ added in v1.1.0
type ConvertErrVal string
type ConvertIntf ¶ added in v1.1.0
type ConvertIntf struct {
Intf ConvertIntfVal
}
type ConvertIntfVal ¶ added in v1.1.0
type ConvertIntfVal struct {
Test string
}
type ConvertString ¶ added in v1.1.0
type ConvertString struct {
String ConvertStringVal
}
type ConvertStringMapValue ¶ added in v1.1.0
type ConvertStringMapValue struct {
Strings map[string]ConvertStringVal
}
type ConvertStringSlice ¶ added in v1.1.0
type ConvertStringSlice struct {
Strings []ConvertStringVal
}
type ConvertStringVal ¶ added in v1.1.0
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 EmbeddableStruct ¶ added in v1.1.1
type EmbeddableStruct struct {
SomeEmbed string `msg:"someembed,omitempty"`
}
type EmbeddableStruct2 ¶ added in v1.1.1
type EmbeddableStruct2 struct {
SomeEmbed2 string `msg:"someembed2,omitempty"`
}
type EmbeddableStruct2AN ¶ added in v1.1.7
type EmbeddableStruct2AN struct {
SomeEmbed2 []string `msg:"someembed2,allownil"`
}
type EmbeddableStructAN ¶ added in v1.1.7
type EmbeddableStructAN struct {
SomeEmbed []string `msg:"someembed,allownil"`
}
type ErrorCtxAsMap ¶ added in v1.1.0
type ErrorCtxAsMap struct { Val string Child *ErrorCtxMapChild Children []*ErrorCtxMapChild ComplexChild *ErrorCtxMapChildNotInline Map map[string]string Nest struct { Val string Child *ErrorCtxMapChild Children []*ErrorCtxMapChild Map map[string]string Nest struct { Val string Child *ErrorCtxMapChild Children []*ErrorCtxMapChild Map map[string]string } } }
type ErrorCtxAsTuple ¶ added in v1.1.0
type ErrorCtxAsTuple struct { Val string Child *ErrorCtxTupleChild Children []*ErrorCtxTupleChild ComplexChild *ErrorCtxTupleChildNotInline Map map[string]string Nest struct { Val string Child *ErrorCtxTupleChild Children []*ErrorCtxTupleChild Map map[string]string Nest struct { Val string Child *ErrorCtxTupleChild Children []*ErrorCtxTupleChild Map map[string]string } } }
type ErrorCtxMapChild ¶ added in v1.1.0
type ErrorCtxMapChild struct {
Val string
}
type ErrorCtxMapChildNotInline ¶ added in v1.1.0
type ErrorCtxMapChildNotInline struct {
Val1, Val2, Val3, Val4, Val5 string
}
type ErrorCtxTupleChild ¶ added in v1.1.0
type ErrorCtxTupleChild struct {
Val string
}
type ErrorCtxTupleChildNotInline ¶ added in v1.1.0
type ErrorCtxTupleChildNotInline struct {
Val1, Val2, Val3, Val4, Val5 string
}
type FileHandle ¶
type GetUserRequest ¶ added in v1.1.1
type GetUserRequestWithEmbeddedStruct ¶ added in v1.1.1
type Issue102MapUsesTuple ¶ added in v1.1.0
type Issue102MapUsesTuple struct { Nested Issue102Tuple NestedPtr *Issue102Tuple }
type Issue102Tuple ¶ added in v1.1.0
type Issue102Tuple struct{}
type Issue102TupleDeep ¶ added in v1.1.0
type Issue102TupleUsesMap ¶ added in v1.1.0
type Issue102TupleUsesTuple ¶ added in v1.1.0
type Issue102TupleUsesTuple struct { Nested Issue102Tuple NestedPtr *Issue102Tuple }
type Issue102Uses ¶ added in v1.1.0
type Issue102deep ¶ added in v1.1.0
type NamedFloat64 ¶ added in v1.1.1
type NamedFloat64 float64
type NamedString ¶ added in v1.1.1
type NamedString string
type NamedStruct ¶ added in v1.1.1
type NamedStructAN ¶ added in v1.1.7
type NonMsgStructTags ¶ added in v1.1.0
type NotAllowNil10 ¶ added in v1.1.7
type NotAllowNil10 struct { Field00 []string `msg:"field00"` Field01 []string `msg:"field01"` Field02 []string `msg:"field02"` Field03 []string `msg:"field03"` Field04 []string `msg:"field04"` Field05 []string `msg:"field05"` Field06 []string `msg:"field06"` Field07 []string `msg:"field07"` Field08 []string `msg:"field08"` Field09 []string `msg:"field09"` }
type NotOmitEmpty10 ¶ added in v1.1.1
type NotOmitEmpty10 struct { Field00 string `msg:"field00"` Field01 string `msg:"field01"` Field02 string `msg:"field02"` Field03 string `msg:"field03"` Field04 string `msg:"field04"` Field05 string `msg:"field05"` Field06 string `msg:"field06"` Field07 string `msg:"field07"` Field08 string `msg:"field08"` Field09 string `msg:"field09"` }
type OmitEmpty0 ¶ added in v1.1.1
type OmitEmpty0 struct { ABool bool `msg:"abool,omitempty"` AInt int `msg:"aint,omitempty"` AInt8 int8 `msg:"aint8,omitempty"` AInt16 int16 `msg:"aint16,omitempty"` AInt32 int32 `msg:"aint32,omitempty"` AInt64 int64 `msg:"aint64,omitempty"` AUint uint `msg:"auint,omitempty"` AUint8 uint8 `msg:"auint8,omitempty"` AUint16 uint16 `msg:"auint16,omitempty"` AUint32 uint32 `msg:"auint32,omitempty"` AUint64 uint64 `msg:"auint64,omitempty"` AFloat32 float32 `msg:"afloat32,omitempty"` AFloat64 float64 `msg:"afloat64,omitempty"` AComplex64 complex64 `msg:"acomplex64,omitempty"` AComplex128 complex128 `msg:"acomplex128,omitempty"` ANamedBool bool `msg:"anamedbool,omitempty"` ANamedInt int `msg:"anamedint,omitempty"` ANamedFloat64 float64 `msg:"anamedfloat64,omitempty"` AMapStrStr map[string]string `msg:"amapstrstr,omitempty"` APtrNamedStr *NamedString `msg:"aptrnamedstr,omitempty"` AString string `msg:"astring,omitempty"` ANamedString string `msg:"anamedstring,omitempty"` AByteSlice []byte `msg:"abyteslice,omitempty"` ASliceString []string `msg:"aslicestring,omitempty"` ASliceNamedString []NamedString `msg:"aslicenamedstring,omitempty"` ANamedStruct NamedStruct `msg:"anamedstruct,omitempty"` APtrNamedStruct *NamedStruct `msg:"aptrnamedstruct,omitempty"` AUnnamedStruct struct { A string `msg:"a,omitempty"` } `msg:"aunnamedstruct,omitempty"` // omitempty not supported on unnamed struct EmbeddableStruct `msg:",flatten,omitempty"` // embed flat EmbeddableStruct2 `msg:"embeddablestruct2,omitempty"` // embed non-flat AArrayInt [5]int `msg:"aarrayint,omitempty"` // not supported ATime time.Time `msg:"atime,omitempty"` }
type OmitEmpty10 ¶ added in v1.1.1
type OmitEmpty10 struct { Field00 string `msg:"field00,omitempty"` Field01 string `msg:"field01,omitempty"` Field02 string `msg:"field02,omitempty"` Field03 string `msg:"field03,omitempty"` Field04 string `msg:"field04,omitempty"` Field05 string `msg:"field05,omitempty"` Field06 string `msg:"field06,omitempty"` Field07 string `msg:"field07,omitempty"` Field08 string `msg:"field08,omitempty"` Field09 string `msg:"field09,omitempty"` }
type OmitEmptyHalfFull ¶ added in v1.1.1
type OmitEmptyLotsOFields ¶ added in v1.1.1
type OmitEmptyLotsOFields struct { Field00 string `msg:"field00,omitempty"` Field01 string `msg:"field01,omitempty"` Field02 string `msg:"field02,omitempty"` Field03 string `msg:"field03,omitempty"` Field04 string `msg:"field04,omitempty"` Field05 string `msg:"field05,omitempty"` Field06 string `msg:"field06,omitempty"` Field07 string `msg:"field07,omitempty"` Field08 string `msg:"field08,omitempty"` Field09 string `msg:"field09,omitempty"` Field10 string `msg:"field10,omitempty"` Field11 string `msg:"field11,omitempty"` Field12 string `msg:"field12,omitempty"` Field13 string `msg:"field13,omitempty"` Field14 string `msg:"field14,omitempty"` Field15 string `msg:"field15,omitempty"` Field16 string `msg:"field16,omitempty"` Field17 string `msg:"field17,omitempty"` Field18 string `msg:"field18,omitempty"` Field19 string `msg:"field19,omitempty"` Field20 string `msg:"field20,omitempty"` Field21 string `msg:"field21,omitempty"` Field22 string `msg:"field22,omitempty"` Field23 string `msg:"field23,omitempty"` Field24 string `msg:"field24,omitempty"` Field25 string `msg:"field25,omitempty"` Field26 string `msg:"field26,omitempty"` Field27 string `msg:"field27,omitempty"` Field28 string `msg:"field28,omitempty"` Field29 string `msg:"field29,omitempty"` Field30 string `msg:"field30,omitempty"` Field31 string `msg:"field31,omitempty"` Field32 string `msg:"field32,omitempty"` Field33 string `msg:"field33,omitempty"` Field34 string `msg:"field34,omitempty"` Field35 string `msg:"field35,omitempty"` Field36 string `msg:"field36,omitempty"` Field37 string `msg:"field37,omitempty"` Field38 string `msg:"field38,omitempty"` Field39 string `msg:"field39,omitempty"` Field40 string `msg:"field40,omitempty"` Field41 string `msg:"field41,omitempty"` Field42 string `msg:"field42,omitempty"` Field43 string `msg:"field43,omitempty"` Field44 string `msg:"field44,omitempty"` Field45 string `msg:"field45,omitempty"` Field46 string `msg:"field46,omitempty"` Field47 string `msg:"field47,omitempty"` Field48 string `msg:"field48,omitempty"` Field49 string `msg:"field49,omitempty"` Field50 string `msg:"field50,omitempty"` Field51 string `msg:"field51,omitempty"` Field52 string `msg:"field52,omitempty"` Field53 string `msg:"field53,omitempty"` Field54 string `msg:"field54,omitempty"` Field55 string `msg:"field55,omitempty"` Field56 string `msg:"field56,omitempty"` Field57 string `msg:"field57,omitempty"` Field58 string `msg:"field58,omitempty"` Field59 string `msg:"field59,omitempty"` Field60 string `msg:"field60,omitempty"` Field61 string `msg:"field61,omitempty"` Field62 string `msg:"field62,omitempty"` Field63 string `msg:"field63,omitempty"` Field64 string `msg:"field64,omitempty"` Field65 string `msg:"field65,omitempty"` Field66 string `msg:"field66,omitempty"` Field67 string `msg:"field67,omitempty"` Field68 string `msg:"field68,omitempty"` Field69 string `msg:"field69,omitempty"` }
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.