Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
wbl
on Nov 27, 2024
|
parent
|
context
|
favorite
| on:
Lies we tell ourselves to keep using Golang (2022)
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.
Yoric
on Nov 27, 2024
|
next
[–]
Which only works when the error itself doesn't contain any information.
It's better than nothing, of course.
the_gipsy
on Nov 27, 2024
|
prev
[–]
Ah okay, it seems to work because errors are pointers, and errors.Is just checks for equality.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: