When the assert.Error method is used with formatting arguments, go vet complains as of 1.7:
flag_test.go:61: possible formatting directive in Error call
For more information and a repro, see:
uber-go/zap#135
The specific check that is run is here:
https://golang.org/src/cmd/vet/print.go#L587
I'm not sure if there's a good fix for this, but I wanted to flag this, as I typically:
- recommend adding context to the
assert.Error calls
- suggest usage of
assert.Error instead of assert.NotNil
However, this "correct" usage of the library leading to a vet failure may mean users will either avoid one or the other.