←back to thread

317 points thunderbong | 6 comments | | HN request time: 0.811s | source | bottom
1. apitman ◴[] No.42202259[source]
When I clicked on the link to codebases relying on the specific error string, I was expecting to see random side projects. Wasn't expecting to see Grafana and Caddy on the list.
replies(3): >>42202363 #>>42203232 #>>42208907 #
2. Cthulhu_ ◴[] No.42202363[source]
Never underestimate the mediocrity of known large codebases, lol.

(just kidding, they're not mediocre, but they're not infallible or perfect either)

replies(1): >>42205120 #
3. gwd ◴[] No.42203232[source]
To be fair to those projects, the type was introduced only three years ago:

https://github.com/golang/go/pull/49359/files

Before that, doing a string compare was basically the only way to detect that specific error. That was definitely an omission on the part of the original authors of the stdlib code; I don't it should be classified as "Hyrum's Law".

replies(1): >>42205108 #
4. apitman ◴[] No.42205108[source]
Yeah I don't doubt it was the best option. Just a bit surprised.
5. apitman ◴[] No.42205120[source]
This instance doesn't necessarily indicate they did anything wrong. See sibling.
6. mholt ◴[] No.42208907[source]
Hey Anders; Francis notified us of this today. I didn't realize a proper type had been created. We'll update our code.