The following if condition
https://github.com/capnproto/go-capnproto2/blob/4a2d721f0c4b15f3e369dc4a82d604ef605d7da5/schemas/schemas.go#L114-L115
is wrong. The error is assigned to r.err but the check below is on err which was previously checked.
Not sure what the correct solution would be, probably the if should just check for r.err, or is the assignment to r.err wrong in the first place?
Found with go nilness analyzer (https://godoc.org/golang.org/x/tools/go/analysis/passes/nilness)
The following if condition
https://github.com/capnproto/go-capnproto2/blob/4a2d721f0c4b15f3e369dc4a82d604ef605d7da5/schemas/schemas.go#L114-L115
is wrong. The error is assigned to
r.errbut the check below is onerrwhich was previously checked.Not sure what the correct solution would be, probably the if should just check for
r.err, or is the assignment tor.errwrong in the first place?Found with go nilness analyzer (https://godoc.org/golang.org/x/tools/go/analysis/passes/nilness)