CodeQL library for Go
codeql/go-all 3.0.1-dev (changelog, source)
Search

Member predicate AstNode::getEnclosingFunction

Gets the innermost function definition to which this AST node belongs, if any.

FuncDef getEnclosingFunction()