Class Callable
A Function or a FuncLit. We do it this way because of limitations of both
Function and FuncDef:
Functionis an entity, and therefore does not include function literals, andFuncDefis an AST node, and so is not extracted for functions from external libraries.
Import path
import semmle.go.ScopesDirect 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. |
| getLocation | Gets the location of this callable. |
| getName | Gets the name of this callable. |
| getType | Gets the type of this callable. |
| hasLocationInfo | DEPRECATED: Use |
| toString | Gets a textual representation of this callable. |