Documentation ¶
Index ¶
- func DedupPaths(paths [][]string) [][]string
- func Equal(a, b []string) bool
- func GetExprsFromStmt(stmt ast.Stmt) []*ast.CallExpr
- func GetFormattedPos(pkg *ssa.Package, pos token.Pos) string
- func GetFuncSignature(expr ast.Expr, info *types.Info) (*types.Signature, error)
- func GetFunctionFromCallInstruction(callInstr ssa.CallInstruction) *ssa.Function
- func GetFunctionFromSite(site ssa.CallInstruction) *ssa.Function
- func GetName(e ast.Expr) string
- func GetParamPos(sig *types.Signature, paramName string) (int, error)
- func GetValueFromExp(exp ast.Expr, pass *analysis.Pass) string
- func IsClosure(function *ssa.Function) bool
- func IsLocal(obj types.Object) bool
- func ResolvePackageFromIdent(expr ast.Expr, info *types.Info) (*types.Package, error)
- func ResolveParamFromName(name string, sig *types.Signature, param *ast.CallExpr, pass *analysis.Pass) string
- func ResolveParamFromPos(pos int, param *ast.CallExpr, pass *analysis.Pass) string
- func ResolveParams(params []indicator.RouteParam, sig *types.Signature, ce *ast.CallExpr, ...) map[string]string
- func SiteMatchesFunc(site ssa.CallInstruction, function *ssa.Function) bool
- type FuncDecl
- type FuncInfo
- type SSAContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DedupPaths ¶
func GetExprsFromStmt ¶
TODO: Lots of repeated code that we can refactor here Further, this is likely not sufficient if used for more general purposes (outside wally) as there are parts of some statements (i.e. a ForStmt Post) that are not handled here
func GetFuncSignature ¶
func GetFunctionFromCallInstruction ¶
func GetFunctionFromCallInstruction(callInstr ssa.CallInstruction) *ssa.Function
func GetFunctionFromSite ¶
func GetFunctionFromSite(site ssa.CallInstruction) *ssa.Function
func IsLocal ¶
Copied from https://github.com/golang/tools/blob/7e4a1ff3b7ea212d372df3899fefe235a20064cc/refactor/rename/util.go#L59
func ResolvePackageFromIdent ¶
ResolvePackageFromIdent TODO: This may be useful to get receiver type of func Also, wrong name, its from an Expr, not from Idt, technically
func ResolveParamFromName ¶
func ResolveParamFromPos ¶
func ResolveParams ¶
func SiteMatchesFunc ¶
func SiteMatchesFunc(site ssa.CallInstruction, function *ssa.Function) bool
Types ¶
Click to show internal directories.
Click to hide internal directories.