tools

module
Version: v0.0.0-...-5dca613 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2020 License: BSD-3-Clause

README

Go Tools

This subrepository holds the source for various packages and tools that support the Go programming language.

Some of the tools, godoc and vet for example, are included in binary Go distributions.

Others, including the Go guru and the test coverage tool, can be fetched with go get.

Packages include a type-checker for Go and an implementation of the Static Single Assignment form (SSA) representation for Go programs.

Download/Install

The easiest way to install is to run go get -u golang.org/x/tools/.... You can also manually git clone the repository to $GOPATH/src/golang.org/x/tools.

JS/CSS Formatting

This repository uses prettier to format JS and CSS files.

The version of prettier used is 1.18.2.

It is encouraged that all JS and CSS code be run through this before submitting a change. However, it is not a strict requirement enforced by CI.

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.

The main issue tracker for the tools repository is located at https://github.com/golang/go/issues. Prefix your issue with "x/tools/(your subdir):" in the subject line, so it is easy to find.

Directories

Path Synopsis
The gopls command is an LSP server for Go.
The gopls command is an LSP server for Go.
doc
Command generate updates settings.md from the UserOptions struct.
Command generate updates settings.md from the UserOptions struct.
integration/parse
Package parse provides functions to parse LSP logs.
Package parse provides functions to parse LSP logs.
integration/replay
Replay logs.
Replay logs.
xint/hooks
Package hooks adds all the standard gopls implementations.
Package hooks adds all the standard gopls implementations.
xint/regtest
Package regtest provides a framework for writing gopls regression tests.
Package regtest provides a framework for writing gopls regression tests.
xint
analysisinternal
Package analysisinternal exposes internal-only fields from go/analysis.
Package analysisinternal exposes internal-only fields from go/analysis.
event
Package event provides a set of packages that cover the main concepts of telemetry in an implementation agnostic way.
Package event provides a set of packages that cover the main concepts of telemetry in an implementation agnostic way.
event/core
Package core provides support for event based telemetry.
Package core provides support for event based telemetry.
event/export/eventtest
Package eventtest supports logging events to a test.
Package eventtest supports logging events to a test.
event/export/metric
Package metric aggregates events into metrics that can be exported.
Package metric aggregates events into metrics that can be exported.
event/export/ocagent
Package ocagent adds the ability to export all telemetry to an ocagent.
Package ocagent adds the ability to export all telemetry to an ocagent.
fastwalk
Package fastwalk provides a faster version of filepath.Walk for file system scanning tools.
Package fastwalk provides a faster version of filepath.Walk for file system scanning tools.
gocommand
Package gocommand is a helper for calling the go command.
Package gocommand is a helper for calling the go command.
gopathwalk
Package gopathwalk is like filepath.Walk but specialized for finding Go packages, particularly in $GOPATH and $GOROOT.
Package gopathwalk is like filepath.Walk but specialized for finding Go packages, particularly in $GOPATH and $GOROOT.
imports
Package imports implements a Go pretty-printer (like package "go/format") that also adds or removes import statements as necessary.
Package imports implements a Go pretty-printer (like package "go/format") that also adds or removes import statements as necessary.
jsonrpc2
Package jsonrpc2 is a minimal implementation of the JSON RPC 2 spec.
Package jsonrpc2 is a minimal implementation of the JSON RPC 2 spec.
jsonrpc2/servertest
Package servertest provides utilities for running tests against a remote LSP server.
Package servertest provides utilities for running tests against a remote LSP server.
lsp
Package lsp implements LSP for gopls.
Package lsp implements LSP for gopls.
lsp/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.
lsp/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.
lsp/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 :=".
lsp/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".
lsp/analysis/simplifycompositelit
Package simplifycompositelit defines an Analyzer that simplifies composite literals.
Package simplifycompositelit defines an Analyzer that simplifies composite literals.
lsp/analysis/simplifyrange
Package simplifyrange defines an Analyzer that simplifies range statements.
Package simplifyrange defines an Analyzer that simplifies range statements.
lsp/analysis/simplifyslice
Package simplifyslice defines an Analyzer that simplifies slice statements.
Package simplifyslice defines an Analyzer that simplifies slice statements.
lsp/analysis/undeclaredname
Package undeclaredname defines an Analyzer that applies suggested fixes to errors of the type "undeclared name: %s".
Package undeclaredname defines an Analyzer that applies suggested fixes to errors of the type "undeclared name: %s".
lsp/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.
lsp/browser
Package browser provides utilities for interacting with users' browsers.
Package browser provides utilities for interacting with users' browsers.
lsp/cache
Package cache implements the caching layer for gopls.
Package cache implements the caching layer for gopls.
lsp/cmd
Package cmd handles the gopls command line.
Package cmd handles the gopls command line.
lsp/cmd/test
Package cmdtest contains the test suite for the command line behavior of gopls.
Package cmdtest contains the test suite for the command line behavior of gopls.
lsp/debug
Package debug exports debug information for gopls.
Package debug exports debug information for gopls.
lsp/debug/tag
Package tag provides the labels used for telemetry throughout gopls.
Package tag provides the labels used for telemetry throughout gopls.
lsp/diff
Package diff supports a pluggable diff algorithm.
Package diff supports a pluggable diff algorithm.
lsp/diff/difftest
Package difftest supplies a set of tests that will operate on any implementation of a diff algorithm as exposed by "github.com/charlievieth/tools/xint/lsp/diff"
Package difftest supplies a set of tests that will operate on any implementation of a diff algorithm as exposed by "github.com/charlievieth/tools/xint/lsp/diff"
lsp/diff/myers
Package myers implements the Myers diff algorithm.
Package myers implements the Myers diff algorithm.
lsp/fake
Package fake provides fake implementations of a text editor, LSP client plugin, and Sandbox environment for use in tests.
Package fake provides fake implementations of a text editor, LSP client plugin, and Sandbox environment for use in tests.
lsp/fuzzy
Package fuzzy implements a fuzzy matching algorithm.
Package fuzzy implements a fuzzy matching algorithm.
lsp/helper
Invoke with //go:generate helper/helper -t Server -d protocol/tsserver.go -u lsp -o server_gen.go invoke in internal/lsp
Invoke with //go:generate helper/helper -t Server -d protocol/tsserver.go -u lsp -o server_gen.go invoke in internal/lsp
lsp/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.
lsp/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.
lsp/protocol
Package protocol contains the structs that map directly to the wire format of the "Language Server Protocol".
Package protocol contains the structs that map directly to the wire format of the "Language Server Protocol".
lsp/snippet
Package snippet implements the specification for the LSP snippet format.
Package snippet implements the specification for the LSP snippet format.
lsp/source
Package source provides core features for use by Go editors and tools.
Package source provides core features for use by Go editors and tools.
lsp/source/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.
lsp/source/genapijson
Command genapijson generates JSON describing gopls' external-facing API, including user settings and commands.
Command genapijson generates JSON describing gopls' external-facing API, including user settings and commands.
lsp/tests
Package tests exports functionality to be used across a variety of gopls tests.
Package tests exports functionality to be used across a variety of gopls tests.
memoize
Package memoize supports memoizing the return values of functions with idempotent results that are expensive to compute.
Package memoize supports memoizing the return values of functions with idempotent results that are expensive to compute.
packagesinternal
Package packagesinternal exposes internal-only fields from go/packages.
Package packagesinternal exposes internal-only fields from go/packages.
proxydir
Package proxydir provides functions for writing module data to a directory in proxy format, so that it can be used as a module proxy by setting GOPROXY="file://<dir>".
Package proxydir provides functions for writing module data to a directory in proxy format, so that it can be used as a module proxy by setting GOPROXY="file://<dir>".
span
Package span contains support for representing with positions and ranges in text files.
Package span contains support for representing with positions and ranges in text files.
stack
Package stack provides support for parsing standard goroutine stack traces.
Package stack provides support for parsing standard goroutine stack traces.
stack/gostacks
The gostacks command processes stdin looking for things that look like stack traces and simplifying them to make the log more readable.
The gostacks command processes stdin looking for things that look like stack traces and simplifying them to make the log more readable.
testenv
Package testenv contains helper functions for skipping tests based on which tools are present in the environment.
Package testenv contains helper functions for skipping tests based on which tools are present in the environment.
tool
Package tool is a harness for writing Go tools.
Package tool is a harness for writing Go tools.
xcontext
Package xcontext is a package to offer the extra functionality we need from contexts that is not available from the standard context package.
Package xcontext is a package to offer the extra functionality we need from contexts that is not available from the standard context package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto