News for hackers. Stuff that matters.
Re:Next steps toward Go 2 by tptacek on Wednesday June 26, 2019 @03:46PM (#20288432)
If an error is unrecoverable, panic. If all you're trying to do is generate a 500 error, net/http even handles the panic for you. If you're a library author and unsure of whether your callers want a panic or not, provide a normal and an (idiomatic) "Must" version that panics on the error.

There are legitimate criticisms to be made of how Go's error handling works, but I think the language already handles the case you're talking about.

There are no comments on this comment yet.