types

package
v2.0.0-alpha.11 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: MIT Imports: 10 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

func ContainsContext(t *types.Tuple) bool

func ContainsError

func ContainsError(results *types.Tuple) bool

func DetectBasePath

func DetectBasePath(pkg *packages.Package) (string, error)

func DetectPkgPath

func DetectPkgPath(pkg *packages.Package) (string, error)

func EvalBinaryExpr

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

func EvalInt

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

func GetBitSize

func GetBitSize(kind types.BasicKind) string

func Inspect

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

func IsContext

func IsContext(t types.Type) bool

func IsError

func IsError(t types.Type) bool

func IsNamed

func IsNamed(t *types.Tuple) bool

func IsNil

func IsNil(t types.Type) bool

func IsPanic

func IsPanic(t types.Type) bool

func NameType

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

func NameTypeParams

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

func Params

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

func ZeroValue

func ZeroValue(t types.Type, qf types.Qualifier) string

Types

type FilterFn

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