3 ms·
They should add a check for comparing an error value to a string [1]. I've seen lots of mission critical software written in Go now that does this. Just today I
by voidnullnil 5y ago
They should add a check for comparing an error value to a string [1]. I've seen lots of mission critical software written in Go now that does this. Just today I came across a bunch of if string.Contains(err.Error(), "problem X") {...}.
1. https://www.lainchan.org/%CE%BB/src/1612397614615.jpg https://www.lainchan.org/%CE%BB/src/1612397614615.jpg https://www.lainchan.org/%CE%BB/src/1612397701473.jpg https://www.lainchan.org/%CE%BB/src/1612397701473.jpg https://www.lainchan.org/%CE%BB/src/1612398029019.jpg https://www.lainchan.org/%CE%BB/src/1612398029019.jpg