Skip to content

Commit

Permalink
fix: Conform to go test naming convention
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tsbkw committed Oct 26, 2022
1 parent c367ed2 commit 41f3495
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion testing/testing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 41f3495

Please sign in to comment.