_generated

package
v0.0.0-...-0cea1fa Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2015 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AliasContainer

type AliasContainer struct {
	Fast FastAlias
}

type Block

type Block [32]byte

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 FastAlias

type FastAlias TestFast

Test nested aliases

type FileHandle

type FileHandle struct {
	Relevent 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 MyEnum

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

func (MyEnum) String

func (m MyEnum) String() string

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 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"`
}

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
	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