--
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Most functions will abort after their first error; so a single error is much more common than multiple errors. When you can have multiple errors, you can do something like http://play.golang.org/p/X2Q2aVJweW (a []error that fulfills the error interface itself).
--
You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/zE-CrCoeziw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-nuts...@googlegroups.com.
I decided not to go this route because if my function *could* go on after hitting an error then either-
a. From my function's pov it's not really an error but an event to ignore or log (and perhaps work around in parent / downstream code)
Or
b. The function is trying to do too many things and should be broken up into simpler units that return a single error to a parent which IS in a position to ignore or log errors where applicable
Keeping error as a single return value rather than a slice had a simplifying effect on my code.
Best regards
Srinath
You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/zE-CrCoeziw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-nuts...@googlegroups.com.