Let me start with a disclaimer, I don’t really know if this is a pattern that must be followed or it’s just a weird idea coming out of my head. The second disclaimer is that I am pretty sure that I am not the only mind that thought about this, but I didn’t see it in use in any place. Why? Error handling in Go has his advantages and disadvantages, for me, the most important disadvantage is the “weird” way of checking the error just after the line that can raise it.