Normally you would expect ok to be true, if a type assertion is correct, see e.g.:
https://go.dev/tour/methods/15
However for the FromError method the return value is false, when the underlying type assertion is correct (from docs):

From source:

That's not intuitive and goes against what "ok" means in many other cases in go.
Changing this would ofc. be a breaking change
Normally you would expect ok to be true, if a type assertion is correct, see e.g.:
https://go.dev/tour/methods/15
However for the FromError method the return value is false, when the underlying type assertion is correct (from docs):


From source:
That's not intuitive and goes against what "ok" means in many other cases in go.
Changing this would ofc. be a breaking change