LinuxCommandLibrary

go-tool

TLDR

List available tools

$ go tool
copy
Run pprof
$ go tool pprof [profile.pb.gz]
copy
Run trace
$ go tool trace [trace.out]
copy
Run compile
$ go tool compile [file.go]
copy
Run objdump
$ go tool objdump [binary]
copy

SYNOPSIS

go tool [tool] [arguments]

DESCRIPTION

go tool runs Go toolchain programs. It provides access to low-level tools like the compiler, linker, profiler, and tracer that underlie go build.
The command is used for advanced debugging, profiling, and understanding compiler behavior. Each tool has its own options and usage.
go tool exposes the Go toolchain internals.

PARAMETERS

TOOL

Tool name to run.
ARGUMENTS
Tool-specific arguments.
pprof
Profile viewer.
trace
Execution tracer.
compile
Go compiler.
link
Go linker.
objdump
Object file disassembler.
--help
Display help information.

CAVEATS

Low-level tools. May change between versions. For advanced users.

HISTORY

go tool provides access to Go toolchain internals, supporting debugging and optimization workflows.

SEE ALSO

go(1), go-build(1)

Copied to clipboard