Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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".



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: