gopls command - golang.org/x/tools/gopls - Go Packages (original) (raw)

Path

Synopsis

analysis/deprecated

Package deprecated defines an Analyzer that marks deprecated symbols and package imports.

Package deprecated defines an Analyzer that marks deprecated symbols and package imports.

Package embeddirective defines an Analyzer that validates //go:embed directives.

analysis/fillreturns

Package fillreturns defines an Analyzer that will attempt to automatically fill in a return statement that has missing values with zero value elements.

Package fillreturns defines an Analyzer that will attempt to automatically fill in a return statement that has missing values with zero value elements.

analysis/fillstruct

Package fillstruct defines an Analyzer that automatically fills in a struct declaration with zero value elements for each field.

Package fillstruct defines an Analyzer that automatically fills in a struct declaration with zero value elements for each field.

Package fillswitch identifies switches with missing cases.

analysis/maprange

Package maprange defines an Analyzer that checks for redundant use of the functions maps.Keys and maps.Values in "for" statements with "range" clauses.

Package maprange defines an Analyzer that checks for redundant use of the functions maps.Keys and maps.Values in "for" statements with "range" clauses.

analysis/maprange/cmd/maprange command

The maprange command applies the golang.org/x/tools/gopls/internal/analysis/maprange analysis to the specified packages of Go source code.

The maprange command applies the golang.org/x/tools/gopls/internal/analysis/maprange analysis to the specified packages of Go source code.

The modernize command suggests (or, with -fix, applies) fixes that clarify Go code by using more modern features.

analysis/nonewvars

Package nonewvars defines an Analyzer that applies suggested fixes to errors of the type "no new variables on left side of :=".

Package nonewvars defines an Analyzer that applies suggested fixes to errors of the type "no new variables on left side of :=".

analysis/noresultvalues

Package noresultvalues defines an Analyzer that applies suggested fixes to errors of the type "no result values expected".

Package noresultvalues defines an Analyzer that applies suggested fixes to errors of the type "no result values expected".

analysis/recursiveiter

Package recursiveiter defines an Analyzer that checks for mistakes in iterators for recursive data structures.

Package recursiveiter defines an Analyzer that checks for mistakes in iterators for recursive data structures.

Package simplifycompositelit defines an Analyzer that simplifies composite literals.

Package simplifyrange defines an Analyzer that simplifies range statements.

Package simplifyslice defines an Analyzer that simplifies slice statements.

analysis/unusedfunc

Package unusedfunc defines an analyzer that checks for unused functions and methods

Package unusedfunc defines an analyzer that checks for unused functions and methods

analysis/unusedparams

Package unusedparams defines an analyzer that checks for unused parameters of functions.

Package unusedparams defines an analyzer that checks for unused parameters of functions.

The unusedparams command runs the unusedparams analyzer.

Package unusedvariable defines an analyzer that checks for unused variables.

analysis/yield

Package yield defines an Analyzer that checks for mistakes related to the yield function used in iterators.

Package yield defines an Analyzer that checks for mistakes related to the yield function used in iterators.

cache

Package cache is the core of gopls: it is concerned with state management, dependency analysis, and invalidation; and it holds the machinery of type checking and modular static analysis.

Package cache is the core of gopls: it is concerned with state management, dependency analysis, and invalidation; and it holds the machinery of type checking and modular static analysis.

cache/metadata

The metadata package defines types and functions for working with package metadata, which describes Go packages and their relationships.

The metadata package defines types and functions for working with package metadata, which describes Go packages and their relationships.

cache/methodsets

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.

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.

cache/parsego

The parsego package defines the File type, a wrapper around a go/ast.File that is useful for answering LSP queries.

The parsego package defines the File type, a wrapper around a go/ast.File that is useful for answering LSP queries.

cache/symbols

Package symbols defines the serializable index of package symbols extracted from parsed package files.

Package symbols defines the serializable index of package symbols extracted from parsed package files.

cache/typerefs

Package typerefs extracts symbol-level reachability information from the syntax of a Go package.

Package typerefs extracts symbol-level reachability information from the syntax of a Go package.

cache/xrefs

Package xrefs defines the serializable index of cross-package references that is computed during type checking.

Package xrefs defines the serializable index of cross-package references that is computed during type checking.

clonetest

Package clonetest provides utility functions for testing Clone operations.

Package clonetest provides utility functions for testing Clone operations.

cmd

Package cmd handles the gopls command line.

Package cmd handles the gopls command line.

debug

Package debug exports debug information for gopls.

Package debug exports debug information for gopls.

debug/log

Package log provides helper methods for exporting log events to the internal/event package.

Package log provides helper methods for exporting log events to the internal/event package.

doc

The doc package provides JSON metadata that documents gopls' public interfaces.

The doc package provides JSON metadata that documents gopls' public interfaces.

doc/generate command

The generate command updates the following files of documentation:

The generate command updates the following files of documentation:

file

The file package defines types used for working with LSP files.

The file package defines types used for working with LSP files.

filecache

The filecache package provides a file-based shared durable blob cache.

The filecache package provides a file-based shared durable blob cache.

fuzzy

Package fuzzy implements a fuzzy matching algorithm.

Package fuzzy implements a fuzzy matching algorithm.

goasm

Package goasm provides language-server features for files in Go assembly language (https://go.dev/doc/asm).

Package goasm provides language-server features for files in Go assembly language (https://go.dev/doc/asm).

golang

Package golang defines the LSP features for navigation, analysis, and refactoring of Go source code.

Package golang defines the LSP features for navigation, analysis, and refactoring of Go source code.

golang/completion

Package completion provides core functionality for code completion in Go editors and tools.

Package completion provides core functionality for code completion in Go editors and tools.

Package snippet implements the specification for the LSP snippet format.

golang/stubmethods

Package stubmethods provides the analysis logic for the quick fix to "Declare missing methods of TYPE" errors.

Package stubmethods provides the analysis logic for the quick fix to "Declare missing methods of TYPE" errors.

label

Package label provides common labels used to annotate gopls log messages and events.

Package label provides common labels used to annotate gopls log messages and events.

lsprpc

Package lsprpc implements a jsonrpc2.StreamServer that may be used to serve the LSP on a jsonrpc2 channel.

Package lsprpc implements a jsonrpc2.StreamServer that may be used to serve the LSP on a jsonrpc2 channel.

mod

Package mod provides core features related to go.mod file handling for use by Go editors and tools.

Package mod provides core features related to go.mod file handling for use by Go editors and tools.

progress

The progress package defines utilities for reporting the progress of long-running operations using features of the LSP client interface such as Progress and ShowMessage.

The progress package defines utilities for reporting the progress of long-running operations using features of the LSP client interface such as Progress and ShowMessage.

protocol

Package protocol contains the structs that map directly to the request and response messages of the Language Server Protocol.

Package protocol contains the structs that map directly to the request and response messages of the Language Server Protocol.

protocol/command

Package command defines the interface provided by gopls for the workspace/executeCommand LSP request.

Package command defines the interface provided by gopls for the workspace/executeCommand LSP request.

Package commandmeta provides metadata about LSP commands, by statically analyzing the command.Interface type.

protocol/command/gen

Package gen is used to generate command bindings from the gopls command interface.

Package gen is used to generate command bindings from the gopls command interface.

protocol/generate command

The generate command generates Go declarations from VSCode's description of the Language Server Protocol.

The generate command generates Go declarations from VSCode's description of the Language Server Protocol.

protocol/semtok

The semtok package provides an encoder for LSP's semantic tokens.

The semtok package provides an encoder for LSP's semantic tokens.

server

Package server defines gopls' implementation of the LSP server interface, protocol.Server.

Package server defines gopls' implementation of the LSP server interface, protocol.Server.

template

Package template contains code for dealing with templates

Package template contains code for dealing with templates

test/integration

Package integration provides a framework for writing integration tests of gopls.

Package integration provides a framework for writing integration tests of gopls.

The bench package implements benchmarks for various LSP operations.

test/integration/fake

Package fake provides a fake implementation of an LSP-enabled text editor, its LSP client plugin, and a Sandbox environment for use in integration tests.

Package fake provides a fake implementation of an LSP-enabled text editor, its LSP client plugin, and a Sandbox environment for use in integration tests.

Package glob implements an LSP-compliant glob pattern matcher for testing.

test/marker

Package marker defines a framework for running "marker" tests, each defined by a file in the testdata subdirectory.

Package marker defines a framework for running "marker" tests, each defined by a file in the testdata subdirectory.

util/asm

Package asm provides a simple parser for Go assembly files.

Package asm provides a simple parser for Go assembly files.

util/browser

Package browser provides utilities for interacting with users' browsers.

Package browser provides utilities for interacting with users' browsers.

util/bug

Package bug provides utilities for reporting internal bugs, and being notified when they occur.

Package bug provides utilities for reporting internal bugs, and being notified when they occur.

util/constraints

Package constraints defines a set of useful constraints to be used with type parameters.

Package constraints defines a set of useful constraints to be used with type parameters.

util/cursorutil

Package cursorutil provides utility functions for working with inspector.Cursor.

Package cursorutil provides utility functions for working with inspector.Cursor.

util/fingerprint

Package fingerprint defines a function to Encode types as strings with the property that identical types have equal string encodings, in most cases.

Package fingerprint defines a function to Encode types as strings with the property that identical types have equal string encodings, in most cases.

util/frob

Package frob is a fast restricted object encoder/decoder in the spirit of encoding/gob.

Package frob is a fast restricted object encoder/decoder in the spirit of encoding/gob.

util/goversion

Package goversions defines gopls's policy for which versions of Go it supports.

Package goversions defines gopls's policy for which versions of Go it supports.

util/immutable

The immutable package defines immutable wrappers around common data structures.

The immutable package defines immutable wrappers around common data structures.

util/lru

The lru package implements a fixed-size in-memory LRU cache.

The lru package implements a fixed-size in-memory LRU cache.

util/memoize

Package memoize defines a "promise" abstraction that enables memoization of the result of calling an expensive but idempotent function.

Package memoize defines a "promise" abstraction that enables memoization of the result of calling an expensive but idempotent function.

util/persistent

The persistent package defines various persistent data structures; that is, data structures that can be efficiently copied and modified in sublinear time.

The persistent package defines various persistent data structures; that is, data structures that can be efficiently copied and modified in sublinear time.

util/safetoken

Package safetoken provides wrappers around methods in go/token, that return errors rather than panicking.

Package safetoken provides wrappers around methods in go/token, that return errors rather than panicking.

util/tokeninternal

package tokeninternal provides convenient helpers for the go/token package.

package tokeninternal provides convenient helpers for the go/token package.

version

Package version manages the gopls version.

Package version manages the gopls version.

Package govulncheck contains the JSON output structs for govulncheck.

vulncheck/osv

Package osv implements the Go OSV vulnerability format (https://go.dev/security/vuln/database#schema), which is a subset of the OSV shared vulnerability format (https://ossf.github.io/osv-schema), with database and ecosystem-specific meanings and fields.

Package osv implements the Go OSV vulnerability format (https://go.dev/security/vuln/database#schema), which is a subset of the OSV shared vulnerability format (https://ossf.github.io/osv-schema), with database and ecosystem-specific meanings and fields.

vulncheck/semver

Package semver provides shared utilities for manipulating Go semantic versions.

Package semver provides shared utilities for manipulating Go semantic versions.

Package vulntest provides helpers for vulncheck functionality testing.