3 ms·
Yeah because that's the error interface? It's literally a method that returns string. Unfortunately, I guess after the fact they decided pattern matching was u
by ttymck 3y ago
Yeah because that's the error interface? It's literally a method that returns string.
Unfortunately, I guess after the fact they decided pattern matching was useful, so they did it via reflection (errors.As). But they don't warn you that errors.Is might return false for a true errors.As, it is certainly a mess, but the pedagogy could be improved.