←back to thread

313 points thunderbong | 1 comments | | HN request time: 0.2s | source
Show context
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 #
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 #
1. apitman ◴[] No.42205108[source]
Yeah I don't doubt it was the best option. Just a bit surprised.