Closed sbinet closed 8 months ago
Ouch. That's the usual "nil pointer but not actually nil interface" footgun right?
Can we ensure that we never return a nil *Error
(which ends up being a non-nil error
)? Even if resp.ResponseDescription == ""
?
Probably this would help:
var err error
if resp.Error != nil {
err = resp.Error
}
That's the usual "nil pointer but not actually nil interface" footgun right?
yep, that's the one.
PTAL.
This CL corrects the following bug uncovered by staticcheck: