Categorygithub.com/Matts966/analysisutil
modulepackage
0.0.8
Repository: https://github.com/matts966/analysisutil.git
Documentation: pkg.go.dev

# README

analysisutil

godoc.org

Utilities for x/tools/go/analysis package.

# Functions

BinOp returns binary operator values which are contained in the block b.
Called returns true when f is called in the instr.
CalledBeforeAndEqualTo checks like CalledFromBefore and if the result of call is equal to o.
CalledFrom checks whether receiver's method is called in an instruction which belogns to after i-th instructions, or in succsor blocks of b.
CalledFromAfter checks whether receiver's method is called in instructions which belongs to after i-th instructions, or in succs blocks of b.
CalledFromBefore checks whether receiver's method is called in an instruction which belongs to before i-th instructions, or in preds blocks of b.
File finds *ast.File in pass.Files by pos.
HasField returns whether the struct has the field.
IfInstr returns *ssa.If which is contained in the block b.
ImplementsError return whether t implements error interface.
Interfaces returns a map of interfaces which are declared in the package.
LookupFromImports finds an object from import paths.
MethodOf returns a method which has given name in the type.
ObjectOf returns types.Object by given name in the package.
Phi returns phi values which are contained in the block b.
PkgUsedInFunc returns true when the given f imports the pkg.
PkgUsedInPass returns true when the given pass imports the pkg.
RemoVendor removes vendoring information from import path.
ReturnReceiverIfCalled returns value of the first argment which is probablly the receiver when f is called in the instr.
Returns returns a slice of *ssa.Return in the function.
Structs returns a map of structs which are declared in the package.
TypeOf returns types.Type by given name in the package.
No description provided by the author

# Structs

CalledChecker checks a function is called.