Go Tool Shared Flags

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

Internal

Overview

These flags are shared by the build, clean, get, install, list, run, and test commands.

-v

Print the names of packages as they are compiled.

-x

Print the commands while running them.

-a

Force rebuilding of packages that are already up-to-date.

-n

Print the commands but do not run them.

-work

Print the name of the temporary work directory and do not delete it when exiting.

-p

-p n

represents the number of programs, such as build commands or test binaries, that can be run in parallel. The default is the number of CPUs available, except on darwin/arm which defaults to 1.

-race

Enable data race detection. Supported only on linux/amd64, freebsd/amd64, darwin/amd64 and windows/amd64.

-msan

Enable interoperation with memory sanitizer. Supported only on linux/amd64, and only with Clang/LLVM as the host C compiler.