Class Callable
A Function
or a FuncLit
. We do it this way because of limitations of both
Function
and FuncDef
:
Function
is an entity, and therefore does not include function literals, andFuncDef
is an AST node, and so is not extracted for functions from external libraries.
Import path
import semmle.go.Scopes
Direct supertypes
Predicates
asFuncLit | Gets this callable as a function literal, if it is one. |
asFunction | Gets this callable as a function, if it is one. |
getFuncDef | Gets this function’s definition, if it exists. |
getName | Gets the name of this callable. |
getType | Gets the type of this callable. |
hasLocationInfo | Holds if this element is at the specified location. The location spans column |
toString | Gets a textual representation of this callable. |