toolsgolang.org/x/tools/internal Directories

internal/ directory

Directories

PathSynopsis
internal/aliases
internal/analysis
internal/analysis/analyzerutilPackage analyzerutil provides implementation helpers for analyzers.
internal/analysis/driverutilPackage driverutil defines implementation helper functions for analysis drivers such as unitchecker, {single,multi}checker, and analysistest.
internal/analysis/generatedPackage generated defines an analyzer whose result makes it convenient to skip diagnostics within generated files.
internal/analysis/typeindexPackage typeindex defines an analyzer that provides a golang.org/x/tools/internal/typesinternal/typeindex.Index.
internal/astutilPackage astutil provides various AST utility functions for gopls.
internal/astutil/freePackage free defines utilities for computing the free variables of a syntax tree without type information.
internal/bisectPackage bisect can be used by compilers and other programs to serve as a target for the bisect debugging tool.
internal/diffPackage diff computes differences between text files or strings.
internal/diff/difftestPackage difftest supplies a set of tests that will operate on any implementation of a diff algorithm as exposed by "golang.org/x/tools/internal/diff"
internal/diff/lcspackage lcs contains code to find longest-common-subsequences (and diffs)
internal/diffpPackage diffp implements a basic diff algorithm equivalent to patience diff.
internal/drivertestThe drivertest package provides a fake implementation of the go/packages driver protocol that delegates to the go list driver.
internal/editPackage edit implements buffered position-based editing of byte slices.
internal/eventPackage event provides a set of packages that cover the main concepts of telemetry in an implementation agnostic way.
internal/event/corePackage core provides support for event based telemetry.
internal/event/export
internal/event/export/eventtestPackage eventtest supports logging events to a test.
internal/event/export/metricPackage metric aggregates events into metrics that can be exported.
internal/event/export/otelPackage otel exports spans and metrics to an OpenTelemetry collector using the OTLP HTTP/JSON protocol.
internal/event/export/prometheus
internal/event/keys
internal/event/label
internal/expectPackage expect provides support for interpreting structured comments in Go source code (including go.mod and go.work files) as test expectations.
internal/factsPackage facts defines a serializable set of analysis.Fact.
internal/fmtstrPackage fmtstr defines a parser for format strings as used by fmt.Printf.
internal/gcimporterPackage gcimporter provides various functions for reading gc-generated object files that can be used to implement the Importer interface defined by the Go 1.5 standard library package.
internal/gocommandPackage gocommand is a helper for calling the go command.
internal/gopathwalkPackage gopathwalk is like filepath.Walk but specialized for finding Go packages, particularly in $GOPATH and $GOROOT.
internal/goplsexportPackage goplsexport provides various backdoors to not-yet-published parts of x/tools that are needed by gopls.
internal/gorootPackage goroot is a copy of package internal/goroot in the main GO repot.
internal/importsPackage imports implements a Go pretty-printer (like package "go/format") that also adds or removes import statements as necessary.
internal/jsonrpc2Package jsonrpc2 is a minimal implementation of the JSON RPC 2 spec.
internal/jsonrpc2/servertestPackage servertest provides utilities for running tests against a remote LSP server.
internal/jsonrpc2/stackPackage stack provides support for parsing standard goroutine stack traces.
internal/jsonrpc2/stack/stacktest
internal/jsonrpc2_v2Package jsonrpc2 is a minimal implementation of the JSON RPC 2 spec.
internal/mcpThe mcp package provides an SDK for writing model context protocol clients and servers.
internal/mcp/examples
internal/mcp/examples/hello
internal/mcp/examples/sse
internal/mcp/internal
internal/mcp/internal/oauthexPackage oauthex implements extensions to OAuth2.
internal/mcp/internal/readme
internal/mcp/internal/readme/client!+
internal/mcp/internal/readme/server!+
internal/mcp/internal/util
internal/mcp/jsonschemaPackage jsonschema is an implementation of the [JSON Schema specification], a JSON-based format for describing the structure of JSON data.
internal/modindexPackage modindex contains code for building and searching an Index of the Go module cache.
internal/modindex/gomodindexA command for building and maintaining the module cache a.out <flags> <command> <args> The commands are: 'update', which attempts to update an existing index, 'query', which looks up things in the index.
internal/moreiters
internal/packagepathPackage packagepath provides metadata operations on package path strings.
internal/packagesinternalPackage packagesinternal exposes internal-only fields from go/packages.
internal/packagestestPackage packagestest creates temporary projects on disk for testing go tools on.
internal/pkgbitsPackage pkgbits implements low-level coding abstractions for Unified IR's export data format.
internal/pprofPackage pprof provides minimalistic routines for extracting information from profiles.
internal/proxydirPackage 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>".
internal/refactorPackage refactor provides operators to compute common textual edits for refactoring tools.
internal/refactor/inlinePackage inline implements inlining of Go function calls.
internal/robustioPackage robustio wraps I/O functions that are prone to failure on Windows, transparently retrying errors up to an arbitrary timeout.
internal/stdlibPackage stdlib provides a table of all exported symbols in the standard library, along with the version at which they first appeared.
internal/testenvPackage testenv contains helper functions for skipping tests based on which tools are present in the environment.
internal/testfilesPackage testfiles provides utilities for writing Go tests with files in testdata.
internal/toolPackage tool is a harness for writing Go tools.
internal/typeparamsPackage typeparams contains common utilities for writing tools that interact with generic Go code, as introduced with Go 1.18.
internal/typeparams/genericfeaturesThe genericfeatures package provides utilities for detecting usage of generic programming in Go packages.
internal/typesinternalPackage typesinternal provides helpful operators for dealing with go/types:
internal/typesinternal/typeindexPackage typeindex provides an Index of type information for a package, allowing efficient lookup of, say, whether a given symbol is referenced and, if so, where from; or of the inspector.Cursor for the declaration of a particular types.Object symbol.
internal/versions
internal/xcontextPackage xcontext is a package to offer the extra functionality we need from contexts that is not available from the standard context package.
Version
v0.43.0
Published
Mar 12, 2026
Platform
js/wasm
Last checked
15 minutes ago

Tools for package owners.