this value of err is never used (SA4006)
Using this program:
package main
import "strconv"
func main() {
n, err := strconv.Atoi("99")
if err != nil {
panic(err)
}
println(n)
_, err = strconv.Atoi("88")
}
With other tools [1], I get this error:
this value of err is never used (SA4006)
but nothing with ErrCheck. I am trying to find something that works with Go 1.18.
- https://github.com/dominikh/go-tools
Sorry, I don't really understand the last bit, is staticcheck from go-tools not working with 1.18?
Errcheck doesn't really do much aside from checking if you captured the returned error. AFAIK the idea is that you can combine it with other tools to perform further analysis.
staticcheck from go-tools does not work with 1.18 at this time
Okay, I see. Other devs may weigh in on this as well, but I think your best bet would be to wait until the 1.18 compatibility.
staticcheck from go-tools does not work with 1.18 at this time
It will in a couple of days :)