Version: v0.2.1 Latest Latest

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

Go to latest
Published: Aug 16, 2021 License: MIT Imports: 6 Imported by: 19




This section is empty.


This section is empty.


func Callee

func Callee(info *types.Info, call *ast.CallExpr) types.Object

func Dereference

func Dereference(T types.Type) types.Type

Dereference returns a pointer's element type; otherwise it returns T.

func DereferenceR

func DereferenceR(T types.Type) types.Type

DereferenceR returns a pointer's element type; otherwise it returns T. If the element type is itself a pointer, DereferenceR will be applied recursively.

func FuncName

func FuncName(f *types.Func) string

func IntuitiveMethodSet

func IntuitiveMethodSet(T types.Type, msets *MethodSetCache) []*types.Selection

func IsObject

func IsObject(obj types.Object, name string) bool

func IsPointerLike

func IsPointerLike(T types.Type) bool

func IsType

func IsType(T types.Type, name string) bool

OPT(dh): IsType is kind of expensive; should we really use it?


type Field

type Field struct {
	Var  *types.Var
	Tag  string
	Path []int

func FlattenFields

func FlattenFields(T *types.Struct) []Field

FlattenFields recursively flattens T and embedded structs, returning a list of fields. If multiple fields with the same name exist, all will be returned.

type Hasher added in v0.2.0

type Hasher = typeutil.Hasher

func MakeHasher added in v0.2.0

func MakeHasher() Hasher

type Map added in v0.2.0

type Map = typeutil.Map

type MethodSetCache

type MethodSetCache = typeutil.MethodSetCache

Jump to

Keyboard shortcuts

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