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

Module Decls

Provides classes for working with declarations.

Import path

import semmle.go.Decls

Imports

go

Provides classes for working with Go programs.

Classes

AliasSpec

An alias declaration specifier.

BadDecl

A bad declaration, that is, a declaration that cannot be parsed.

ConstDecl

A constant declaration.

Decl

A declaration.

EmbeddedFieldDecl

An embedded field declaration in a struct.

EmbeddingSpec

An embedding specification in an interface.

FieldBase

A field declaration, in a struct, a function (for parameter or result variables), or an interface (in which case this is a method or embedding spec).

FieldDecl

A field declaration in a struct type.

FuncDecl

A function declaration.

FuncDef

A function definition, that is, either a function declaration or a function literal.

GenDecl

A generic declaration.

ImportDecl

An import declaration.

ImportSpec

An import specifier.

InterfaceMemberSpec

A method or embedding specification in an interface type expression.

MethodDecl

A method declaration.

MethodSpec

A method specification in an interface.

ParameterDecl

A parameter declaration.

ParameterOrResultDecl

A function parameter or result variable declaration.

ReceiverDecl

A receiver declaration in a function declaration.

ResultVariableDecl

A result variable declaration.

Spec

A declaration specifier.

TypeDecl

A type declaration.

TypeDefSpec

A type definition specifier.

TypeParamDecl

A type parameter declaration in a type specification.

TypeSpec

A type declaration specifier, which is either a type definition or an alias declaration.

ValueSpec

A constant or variable declaration specifier.

VarDecl

A variable declaration.