3 ms·
If you need different logic for different errors out of a function call you wouldn't use this, but your example code there... I think it's at the point where yo
by Dylan16807 2y ago
If you need different logic for different errors out of a function call you wouldn't use this, but your example code there... I think it's at the point where you've made things more complicated for your caller than just returning FirstError{err} no matter what the error is. The caller still has to deal with all the errors getFirst can cause, but they've been reorganized in a complicated bespoke way.
> Does Go even need to consider travelling into those spaces?
Oh come on. Changing how one common piece of boilerplate is written is not travelling into new spaces or moving away from Go's roots.