_generated

package
v2.0.0-...-a928a82 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

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

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 Block

type Block [32]byte

type ConvertErr

type ConvertErr struct {
	Err ConvertErrVal
}

type ConvertErrVal

type ConvertErrVal string

type ConvertIntf

type ConvertIntf struct {
	Intf ConvertIntfVal
}

type ConvertIntfVal

type ConvertIntfVal struct {
	Test string
}

type ConvertString

type ConvertString struct {
	String ConvertStringVal
}

type ConvertStringMapValue

type ConvertStringMapValue struct {
	Strings map[string]ConvertStringVal
}

type ConvertStringSlice

type ConvertStringSlice struct {
	Strings []ConvertStringVal
}

type ConvertStringVal

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 CustomInt

type CustomInt int

type Embedded

type Embedded struct {
	*Embedded   // test embedded field
	Children    []Embedded
	PtrChildren []*Embedded
	Other       string
}

type ErrorCtxAsMap

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

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

type ErrorCtxMapChild struct {
	Val string
}

type ErrorCtxMapChildNotInline

type ErrorCtxMapChildNotInline struct {
	Val1, Val2, Val3, Val4, Val5 string
}

type ErrorCtxTupleChild

type ErrorCtxTupleChild struct {
	Val string
}

type ErrorCtxTupleChildNotInline

type ErrorCtxTupleChildNotInline struct {
	Val1, Val2, Val3, Val4, Val5 string
}

type FastAlias

type FastAlias TestFast

Test nested aliases

type FileHandle

type FileHandle struct {
	Relevant Files  `msg:"files"`
	Name     string `msg:"name"`
}

type Files

type Files []*os.File

type Fixed

type Fixed struct {
	A float64
	B bool
}

test fixed-size struct size compilation

type Insane

type Insane [3]map[string]struct{ A, B CustomInt }

type IntA

type IntA int

Test dependency resolution

type IntB

type IntB IntA

type IntC

type IntC IntB

type Issue102

type Issue102 struct{}

type Issue102MapUsesTuple

type Issue102MapUsesTuple struct {
	Nested    Issue102Tuple
	NestedPtr *Issue102Tuple
}

type Issue102Tuple

type Issue102Tuple struct{}

type Issue102TupleDeep

type Issue102TupleDeep struct {
	A int
	X struct{}
	Y struct{}
	Z int
}

type Issue102TupleUsesMap

type Issue102TupleUsesMap struct {
	Nested    Issue102
	NestedPtr *Issue102
}

type Issue102TupleUsesTuple

type Issue102TupleUsesTuple struct {
	Nested    Issue102Tuple
	NestedPtr *Issue102Tuple
}

type Issue102Uses

type Issue102Uses struct {
	Nested    Issue102
	NestedPtr *Issue102
}

type Issue102deep

type Issue102deep struct {
	A int
	X struct{}
	Y struct{}
	Z int
}

type Issue191

type Issue191 struct {
	Foo string
	Bar string
}

type MyEnum

type MyEnum byte
const (
	A MyEnum = iota
	B
	C
	D
)

func (MyEnum) String

func (m MyEnum) String() string

type NonMsgStructTags

type NonMsgStructTags struct {
	A      []string `json:"fooJSON" msg:"fooMsgp"`
	B      string   `json:"barJSON"`
	C      []string `json:"bazJSON" msg:"-"`
	Nested []struct {
		A          []string `json:"a"`
		B          string   `json:"b"`
		C          []string `json:"c"`
		VeryNested []struct {
			A []string `json:"a"`
			B []string `msg:"bbbb" xml:"-"`
		}
	}
}

type Object

type Object struct {
	ObjectNo string   `msg:"objno"`
	Slice1   []string `msg:"slice1"`
	Slice2   []string `msg:"slice2"`
	MapMap   map[string]map[string]string
}

type SpecialID

type SpecialID string

type T

type T struct {
	T time.Time
}

type TestBench

type TestBench struct {
	Name     string
	BirthDay time.Time
	Phone    string
	Siblings int
	Spouse   bool
	Money    float64
}

type TestFast

type TestFast struct {
	Lat, Long, Alt float64 // test inline decl
	Data           []byte
}

type TestHidden

type TestHidden struct {
	A   string
	B   []float64
	Bad func(string) bool // This results in a warning: field "Bad" unsupported
}

type TestObj

type TestObj struct{ ID1, ID2 SpecialID }

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 Tree

type Tree struct {
	Children []Tree
	Element  int
	Parent   *Wrapper
}

type Wrapper

type Wrapper struct {
	Tree *Tree
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL