package
0.18.1
Repository: https://go.googlesource.com/tools
Documentation: pkg.go.dev

# Packages

The metadata package defines types and functions for working with package metadata, which describes Go packages and their relationships.
Package methodsets defines an incremental, serializable index of method-set information that allows efficient 'implements' queries across packages of the workspace without using the type checker.
The parsego package defines the [File] type, a wrapper around a go/ast.File that is useful for answering LSP queries.
Package symbols defines the serializable index of package symbols extracted from parsed package files.
No description provided by the author
Package typerefs extracts symbol-level reachability information from the syntax of a Go package.
Package xrefs defines the serializable index of cross-package references that is computed during type checking.

# Functions

AnalyzerRunTimes returns the accumulated time spent in each Analyzer's Run function since process start, in descending order.
BuildLink constructs a URL with the given target, path, and anchor.
BundledLazyFixes extracts any bundled codeActions from the diag.Data field.
CheckPathValid checks whether a directory is suitable as a workspace folder.
FetchGoEnv queries the environment and Go command to collect environment variables necessary for the workspace folder.
TODO(rfindley): this function was exposed during refactoring.
New Creates a new cache for gopls operation results, using the given file set, shared store, and session options.
NewFilterer computes regular expression form of all raw filters.
NewSession creates a new gopls session with the given cache.
NewSessionKey creates a new Key for *Session values.
RelevantViews returns the views that may contain the given URI, or nil if none exist.
SuggestedFixFromCommand returns a suggested fix to run the given command.
TempModDir creates a temporary directory with the contents of the provided modURI, as well as its corresponding go.sum file, if it exists.

# Constants

An AdHocView is a collection of files in a given directory, not in GOPATH or a module.
AnalysisProgressTitle is the title of the progress report for ongoing analysis.
cmd/compile -json=0,dir.
GoModView is a view in module mode with a single Go module.
GoPackagesDriverView is a view with a non-empty GOPACKAGESDRIVER environment variable.
GOPATHView is a view in GOPATH mode.
GoVersionForVulnTest is an internal environment variable used in gopls testing to examine govulncheck behavior with a go version different than what `go version` returns in the system.
No description provided by the author
GoWorkView is a view in module mode with a go.work file.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

This error is sought by mod diagnostics.
TODO(rfindley): is the logic surrounding this error actually necessary?.
No description provided by the author
No description provided by the author
No description provided by the author
MaxGovulncheckResultsAge defines the maximum vulnerability age considered valid by gopls.

# Structs

A Cache holds content that is shared across multiple gopls sessions.
A Diagnostic corresponds to an LSP Diagnostic.
No description provided by the author
A Folder represents an LSP workspace folder, together with its per-folder options and environment variables that affect build configuration.
GoEnv holds the environment variables and data from the Go command that is required for operating on a workspace folder.
A InitializationError is an error that causes snapshot initialization to fail.
No description provided by the author
A Package is the union of package metadata and type checking results.
A ParsedModule contains the results of parsing a go.mod file.
A ParsedWorkFile contains the results of parsing a go.work file.
A Session holds the state (views, file contents, parse cache, memoized computations) of a gopls server process.
SessionKey represents an event label key that has a *Session value.
A Snapshot represents the current state for a given view.
A StateChange describes external state changes that may affect a snapshot.
A SuggestedFix represents a suggested fix (for a diagnostic) produced by analysis, in protocol form.
A TidiedModule contains the results of running `go mod tidy` on a module.
View represents a single build for a workspace.

# Type aliases

AllowNetwork determines whether Go commands are permitted to use the network.
A CodeLensSourceFunc is a function that reports CodeLenses (range-associated commands) for a given file.
A DiagnosticSource identifies the source of a diagnostic.
Convenient aliases for very heavily used types.
Convenient aliases for very heavily used types.
Convenient aliases for very heavily used types.
Convenient aliases for very heavily used types.
A ViewType describes how we load package information for a view.