go clean
The go subcommand that removes files produced by builds, and with flags can also empty the build and test caches.
In more detail
Day to day you rarely need it, because the build cache keeps itself correct. go clean -cache and go clean -testcache are useful when disk space runs low or when you want to rule the cache out while chasing a strange result.
Example
go clean -testcacheRelated terms
- go command — The single command-line program that ships with Go and builds, runs, tests, formats and documents your code through subcommands.
- go build — The go subcommand that compiles a package and its dependencies into an executable file and prints nothing when it succeeds.
Taught in
- Installing the Go Toolchain — Concurrent Systems Programming with Go