validator icon indicating copy to clipboard operation
validator copied to clipboard

golangci-lint gives errors for never used variables

Open tanryberdi opened this issue 3 years ago • 0 comments

  • [x] I have looked at the documentation here first?
  • [x] I have looked at the examples provided that may showcase my question here?

Package version eg. v9, v10:

Issue, Question or Enhancement:

Code sample, to showcase or reproduce:

validator_test.go:2041:2: SA4006: this value of `current` is never used (staticcheck)
        current, _, _, ok = v.getStructFieldOKInternal(val, "Inner.CrazyNonExistantField")
        ^
validator_test.go:2044:2: SA4006: this value of `current` is never used (staticcheck)
        current, _, _, ok = v.getStructFieldOKInternal(val, "Inner.Slice[101]")

tanryberdi avatar Oct 07 '22 13:10 tanryberdi