I myself still use the classic string based-errors as 
original designed. These are immutable values that are easy to compare with 
== 
and search with strings.Contains().

I don't think there is a wide accepted best practice here. There are
libraries like "errors" but to me wrapping errors is gratuitous complexity 
that
only adds noise.  That's not a general consensus; just one practitioner's 
opinion.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/golang-nuts/b0d1a19c-8025-4c36-ad39-a3c0571de3c9n%40googlegroups.com.

Reply via email to