From 41f34959352f6f5e46d4acf7ae6fede7bf3c0437 Mon Sep 17 00:00:00 2001 From: tsbkw Date: Wed, 26 Oct 2022 19:06:10 +0900 Subject: [PATCH] fix: Conform to go test naming convention As reported in #835 go vet reporting the violation of naming convention of go test. see: https://pkg.go.dev/testing#hdr-Examples Although this project use golangci-lint as linter and it has functionality to skip by nolint:govet, so basically there is no problems. However if there is no cons, it is better to conform with naming convention and fix the code like below. https://github.com/golang-migrate/migrate/blob/c367ed2f12b8549c2ace442c440a9e312348951d/dktesting/example_test.go#L17 --- testing/testing_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/testing/testing_test.go b/testing/testing_test.go index d5e7ce1d0..3db636e05 100644 --- a/testing/testing_test.go +++ b/testing/testing_test.go @@ -4,7 +4,9 @@ import ( "testing" ) -func ExampleParallelTest(t *testing.T) { // nolint:govet +func ExampleParallelTest() { + t := &testing.T{} // Should actually be used in a Test + var isReady = func(i Instance) bool { // Return true if Instance is ready to run tests. // Don't block here though.