News for hackers. Stuff that matters.
Re:Lies we tell ourselves to keep using Golang by wbl on Wednesday November 27, 2024 @09:18AM (#42256266)
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.
Re:Lies we tell ourselves to keep using Golang by the_gipsy on Wednesday November 27, 2024 @02:07PM (#42258740)
Ah okay, it seems to work because errors are pointers, and errors.Is just checks for equality.
Re:Lies we tell ourselves to keep using Golang by Yoric on Wednesday November 27, 2024 @02:49PM (#42259098)
Which only works when the error itself doesn't contain any information.

It's better than nothing, of course.