lookup

package
v0.0.0-...-27ab5e1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2018 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// TypeToplevel : toplevel (e.g. toplevel function, struct definition)
	TypeToplevel = Type("toplevel")
	// TypeMethod : method (e.g. method function, struct definition)
	TypeMethod = Type("method")
)

Variables

This section is empty.

Functions

func IsMethod

func IsMethod(fn *ast.FuncDecl) bool

IsMethod :

func IsSameTypeOrPointer

func IsSameTypeOrPointer(ob *ast.Object, fn ast.Node) bool

IsSameTypeOrPointer :

Types

type Lookup

type Lookup struct {
	Files []*ast.File
	// contains filtered or unexported fields
}

Lookup :

func New

func New(files ...*ast.File) *Lookup

New :

func (*Lookup) AllMethods

func (k *Lookup) AllMethods(obname string) []*Result

AllMethods :

func (*Lookup) Lookup

func (k *Lookup) Lookup(name string) *Result

Lookup :

func (*Lookup) Method

func (k *Lookup) Method(obname string, name string) *Result

Method :

func (*Lookup) MethodByObject

func (k *Lookup) MethodByObject(ob *ast.Object, name string) *Result

MethodByObject :

func (*Lookup) Toplevel

func (k *Lookup) Toplevel(name string) *Result

Toplevel :

func (*Lookup) With

func (k *Lookup) With(file *ast.File) *Lookup

With :

type Result

type Result struct {
	Type     Type
	FuncDecl *ast.FuncDecl
	Object   *ast.Object
}

Result :

func (*Result) Name

func (r *Result) Name() string

Name :

type Type

type Type string

Type :

Jump to

Keyboard shortcuts

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