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

Last time I wrote go you could write `doThingAndMaybeReturnErr()` without the `_ =`. Has this changed?

The alternative is Zig or Rust's thing, where you still have explicit error handling but you don't repeat the same four lines all the time. This is maybe helpful because in Go one has to read those lines carefully to see if anything unexpected is happening.



Linters such as golangci[1] which will warn if you ignore the return value. If you ever write Go again I highly recommend you look at golangci -- the security checks have been really helpful to me.

[1] https://golangci-lint.run/




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: