Y
Hacker News
new
|
ask
|
show
|
jobs
by
wbl
574 days ago
https://pkg.go.dev/errors#Is
and
https://pkg.go.dev/fmt#Errorf
clearly state that there is a way to match these errors if the package exposes the values, which the stdlib does.
2 comments
Yoric
574 days ago
Which only works when the error itself doesn't contain any information.
It's better than nothing, of course.
link
the_gipsy
574 days ago
Ah okay, it seems to work because errors are pointers, and errors.Is just checks for equality.
link
It's better than nothing, of course.