go-test

Tests Go packages (files have to end with `_test.go`).

TLDR

Test the package found in the current directory

$ go test
copy

[v]erbosely test the package in the current directory

$ go test -v
copy

Test the packages in the current directory and all subdirectories (note the ...)

$ go test -v ./...
copy

Test the package in the current directory and run all benchmarks

$ go test -v -bench .
copy

Test the package in the current directory and run all benchmarks for 50 seconds

$ go test -v -bench . -benchtime [50s]
copy

Copied to clipboard
Coindodo