3 ms·
I guess I am just bad at golang. Loop variable pointer and nil struct is not nil interface are the two that continue to hound us.
by ttymck 3y ago
I guess I am just bad at golang.
Loop variable pointer and nil struct is not nil interface are the two that continue to hound us.
- ttymck 3y agoAlso: type MyError {} var _ error = (&MyError)(nil) errors.As(err, &MyError{}) --- Panicking because it needs to be &&MyError{} instead is a similar gotcha.