From f60e542813d119878c87e6c85d8486b02897f809 Mon Sep 17 00:00:00 2001 From: Davi Date: Wed, 16 Jun 2021 23:07:59 -0300 Subject: [PATCH] go-test: add page (#6130) Co-authored-by: bl-ue <54780737+bl-ue@users.noreply.github.com> --- pages/common/go-test.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pages/common/go-test.md diff --git a/pages/common/go-test.md b/pages/common/go-test.md new file mode 100644 index 0000000000..10ab13824e --- /dev/null +++ b/pages/common/go-test.md @@ -0,0 +1,24 @@ +# go test + +> Tests Go packages (files have to end with `_test.go`). +> More information: . + +- Test the package found in the current directory: + +`go test` + +- [v]erbosely test the package in the current directory: + +`go test -v` + +- Test the packages in the current directory and all subdirectories (note the `...`): + +`go test -v ./...` + +- Test the package in the current directory and run all benchmarks: + +`go test -v -bench .` + +- Test the package in the current directory and run all benchmarks for 50 seconds: + +`go test -v -bench . -benchtime {{50s}}`