You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The err!=nil check returns false for all passed nil pointers to an error interface implementation, resulting in the nil error being included in the constructed error.
The text was updated successfully, but these errors were encountered:
Ok, thanks to the linked tickets, it seems like this is "intended": https://go.dev/doc/faq#nil_error
This still seems to me like a bug rather than a feature.
What do you think?
Go version
go1.23.0
Output of
go env
in your module/workspace:What did you do?
What did you see happen?
Join([err1 err2]) = [err1 err2]; want [err1 err2]
What did you expect to see?
ok
The
err!=nil
check returns false for all passed nil pointers to an error interface implementation, resulting in the nil error being included in the constructed error.The text was updated successfully, but these errors were encountered: