1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-06-05 13:46:00 +02:00

go-test: add page (#6130)

Co-authored-by: bl-ue <54780737+bl-ue@users.noreply.github.com>
This commit is contained in:
Davi 2021-06-16 23:07:59 -03:00 committed by GitHub
parent 6fce037a42
commit f60e542813
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

24
pages/common/go-test.md Normal file
View file

@ -0,0 +1,24 @@
# go test
> Tests Go packages (files have to end with `_test.go`).
> More information: <https://golang.org/cmd/go/#hdr-Testing_flags>.
- 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}}`