types

package
v1.26.7 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorType = types.Universe.Lookup("error").Type()
	PanicType = types.Universe.Lookup("panic").Type()
	NilType   = types.Universe.Lookup("nil").Type()
)

Functions

func ContainsContext added in v1.10.0

func ContainsContext(t *types.Tuple) bool

func ContainsError added in v1.10.0

func ContainsError(results *types.Tuple) bool

func EvalBinaryExpr added in v1.24.1

func EvalBinaryExpr(expr *ast.BinaryExpr) (n, iotas int)

func EvalInt added in v1.24.1

func EvalInt(expr ast.Expr) (n, iotas int)

func GetBitSize

func GetBitSize(kind types.BasicKind) string

func Hash added in v1.23.0

func Hash(name string, hash uint32) uint32

func Inspect added in v1.20.1

func Inspect(pkgs []*packages.Package, f func(p *packages.Package, n ast.Node) bool)

func IsContext added in v1.10.0

func IsContext(t types.Type) bool

func IsError added in v1.10.0

func IsError(t types.Type) bool

func IsNamed added in v1.11.0

func IsNamed(t *types.Tuple) bool

func IsPanic added in v1.10.0

func IsPanic(t types.Type) bool

func LenWithoutContext added in v1.10.0

func LenWithoutContext(t *types.Tuple) int

func LenWithoutErr added in v1.10.0

func LenWithoutErr(t *types.Tuple) int

func LookupField added in v1.10.0

func LookupField(name string, sig *types.Signature) *types.Var

func NameType added in v1.20.1

func NameType(vars []*types.Var, qf types.Qualifier, filterFn FilterFn) (results []string)

func NameTypeParams added in v1.20.1

func NameTypeParams(vars []*types.Var, qf types.Qualifier, filterFn FilterFn) (results []string)

func Params added in v1.20.1

func Params(vars []*types.Var, fn func(p *types.Var) []string, filterFn func(p *types.Var) bool) (results []string)

func ZeroValue added in v1.20.1

func ZeroValue(t types.Type) string

Types

type FilterFn added in v1.20.1

type FilterFn func(p *types.Var) bool

Jump to

Keyboard shortcuts

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