You don't. That's why Go errors are typed. You use `errors.Is` to check if any of the errors in a chain of wrapped errors is of a particular kind. It doesn't grovel through strings to answer that question.
It is very weird that this subthread starts with "current state of the art".
It is very weird that this subthread starts with "current state of the art".