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

Module GoMod

Provides classes for working with go.mod files.

Import path

import semmle.go.GoMod

Imports

go

Provides classes for working with Go programs.

Classes

GoModCommentBlock

A top-level block of comments separate from any rule.

GoModExcludeLine

A line that declares a dependency version to exclude, for example exclude "github.com/github/codeql-go" v1.2.3.

GoModExpr

An expression in a go.mod file, which is used to declare dependencies.

GoModFile

A go.mod file.

GoModGoLine

A line that declares the Go version to be used, for example go 1.14.

GoModLParen

A left parenthesis for a line block.

GoModLine

A single line of tokens.

GoModLineBlock

A factored block of lines, for example: require ( "github.com/github/codeql-go" v1.2.3 "golang.org/x/tools" v3.2.1 )

GoModModuleLine

A line that contains the module’s package path, for example module github.com/github/codeql-go.

GoModRParen

A right parenthesis for a line block.

GoModReplaceLine

A line that specifies a dependency to use instead of another one, for example replace "golang.org/x/tools" => "github.com/golang/tools" v1.2.3.

GoModRequireLine

A line that declares a requirement, for example require "github.com/github/codeql-go" v1.2.3.