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

Module Types

Provides classes for working with Go types.

Import path

import semmle.go.Types

Imports

go

Provides classes for working with Go programs.

Predicates

getTermInIntersection

Gets a term in the intersection of type-set literals a and b.

lookThroughPointerType

Gets the base type if t is a pointer type, otherwise t itself.

numberOfTypesWithMethodName

Gets the number of types with method name.

Classes

ArrayType

An array type.

BasicInterfaceType

A basic interface type.

BasicType

A basic type.

BoolExprType

The bool type of a non-literal expression

BoolLiteralType

The type of a bool literal.

BoolType

The normal boolean type or the literal boolean type

ByteSliceType

A byte slice type

ChanType

A channel type.

ComparableType

The predeclared comparable type.

Complex128Type

The type complex128.

Complex64Type

The type complex64.

ComplexLiteralType

The type of a complex literal.

ComplexType

A complex-number type such as complex64.

CompositeType

A composite type, that is, not a basic type.

EmptyInterfaceType

An empty interface type.

ErrorType

A type that implements the builtin interface error.

Float32Type

The type float32.

Float64Type

The type float64.

FloatLiteralType

The type of a float literal.

FloatType

A floating-point type such as float64.

Int16Type

The type int16.

Int32Type

The type int32.

Int64Type

The type int64.

Int8Type

The type int8.

IntLiteralType

The type of an integer literal.

IntType

The type int.

IntegerType

An integer type such as int or uint64.

InterfaceType

An interface type.

InvalidType

An invalid type.

LiteralType

The type of a literal.

MapType

A map type.

NamedType

A named type.

NilLiteralType

The type of nil.

NumericType

A numeric type such as int or float64.

PointerType

A pointer type.

RecvChanType

A channel type that can only receive.

RuneLiteralType

The type of a rune literal.

SendChanType

A channel type that can only send.

SendRecvChanType

A channel type that can both send and receive.

SignatureType

A signature type.

SignedIntegerType

A signed integer type such as int.

SliceType

A slice type.

StringExprType

The string type of a non-literal expression

StringLiteralType

The type of a string literal.

StringType

The normal string type or the literal string type

StructType

A struct type.

TupleType

A tuple type.

Type

A Go type.

TypeParamType

A type that comes from a type parameter.

TypeSetLiteralType

A type set literal type, used when declaring a non-basic interface. May be a single term, consisting of either a type or a tilde followed by a type, or a union of terms.

TypeSetTerm

A term in a type set literal.

Uint16Type

The type uint16.

Uint32Type

The type uint32.

Uint64Type

The type uint64.

Uint8Type

The type uint8.

UintType

The type uint.

UintptrType

The type uintptr.

UnsafePointerType

The type unsafe.Pointer.

UnsignedIntegerType

An unsigned integer type such as uint.