In Go the standard wisdom is "don't use `panic` and `recover` as convenient syntax sugar for error propagation".
In principle I agree. In practice, it often means this boilerplate is between every line of the big-picture intended-behavior code - a serious worsening to readability, not to mention the experience of writing and editing the code:
if err != nil {
// usually wrap+annotate error
return err
}
So I'm personally also very open to experimenting with violating this convention about error returns, so long as it's done in a clear way, and keeps in mind that errors should always tell callers what they can't already know, and be structured and typed enough so that both code and humans can unambiguously distinguish the error and pull apart useful information.















