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

Class Entity

A declared or built-in entity (that is, package, type, constant, variable, function or label)

Import path

import semmle.go.Scopes

Direct supertypes

Known direct subtypes

Predicates

getAReference

Gets a reference to this entity.

getDeclaration

Gets the declaring identifier for this entity, if any.

getName

Gets the name of this entity.

getPackage

Gets the package in which this entity is declared, if any.

getQualifiedName

Gets the qualified name of this entity, if any.

getScope

Gets the scope in which this entity is declared, if any.

getType

Gets the type of this entity.

hasLocationInfo

Holds if this element is at the specified location. The location spans column startcolumn of line startline to column endcolumn of line endline in file filepath. For more information, see Locations.

hasQualifiedName

Holds if this entity is declared in a package with path pkg and has the given name.

toString

Gets a textual representation of this entity.