News for hackers. Stuff that matters.
Re:Error stack traces in Go with x/xerror by ibraheemdev on Monday August 23, 2021 @08:34PM (#28283839)
I think the main issue is not the boilerplate as is usually the source complaints, but the fact that not handling errors is so easy due to shadowing.
Re:Error stack traces in Go with x/xerror by tsimionescu on Tuesday August 24, 2021 @06:03AM (#28286821)
Both are problematic. Boilerplate does wonders for mistakes hidden in plain sight - especially when you have that one rare piece of code that actually does something with an error, and it completely slips by code review because anyone who works with Go has long learned to glaze over anything that begins with if err!=nil