callector

package
v0.0.0-...-9f3329f Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadPackage

func LoadPackage(dir string) (*packages.Package, error)

Types

type Argument

type Argument struct {
	TypeAndValue types.TypeAndValue
	Expr         ast.Expr
	Def          types.Object
	Reachable    bool
}

func (Argument) Code

func (a Argument) Code() string

func (Argument) PackagePath

func (a Argument) PackagePath() string

type CallInfo

type CallInfo struct {
	Call          *ast.CallExpr
	TypeArguments []TypeArg
	Arguments     []Argument
}

func CollectCalls

func CollectCalls(pkg, function string, file *ast.File, fset *token.FileSet, typesInfo *types.Info) []CallInfo

type TypeArg

type TypeArg struct {
	Type      types.Type
	Expr      ast.Expr
	Reachable bool
}

func (TypeArg) Code

func (t TypeArg) Code() string

func (TypeArg) PackagePath

func (t TypeArg) PackagePath() string

Jump to

Keyboard shortcuts

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