Forrest logo
back to the go tool

go-test:tldr:b4e46

go-test: Test the packages in the current directory and all subdirectories (note the `...`).
$ go test -v ./...
try on your machine

The command go test -v ./... is used with the Go programming language to run tests in a Go project. Here's a breakdown of the individual components:

  • go test: This specifies that we want to run tests using the Go test tool.

  • -v: This flag stands for "verbose" mode. It provides more detailed output during the test run, displaying information about which tests are being run and their results.

  • ./...: This is a wildcard path that instructs the Go test tool to run tests recursively across all the subdirectories in the current directory. It essentially means "run all tests in the current directory and its subdirectories."

By executing this command, the Go test tool will search for test files in the current directory and its subdirectories, and then run all the tests it finds, providing verbose output during the process.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the go tool