Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The Manning Book: "100 Go Mistakes and how to avoid them" gives solid examples of common gotchas with Go's error handling.

I have seen the below occur again and again in Go. (no compiler help, so this can only be caught in reviews and not if the reviewer is tired).

#50: Checking an error type inaccurately

#51: Checking an error value inaccurately

#54: Not handling defer errors



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: