On Mon, Dec 8, 2025 at 3:24 PM Max Claus <[email protected]> wrote:
>
> Thanks, Ian, this is very helpful.
>
> I’ll open an issue in the Go repository suggesting that the net/http 
> documentation be made more explicit: although the HTTP server has built-in 
> panic recovery, it should not be treated as a best practice pattern. The 
> general guidance should be to let unexpected panics crash the program, unless 
> explicitly recovering from a panic you triggered and fully understand.
>
> Do you know if there is an official Go document that states this clearly? It 
> seems like an important detail to have in formal documentation rather than 
> buried in discussion threads, which can be harder to find and consume.

I think the clearest statement of what we consider to be good Go style
may be https://go.dev/wiki/PanicAndRecover.

You also already mentioned the Google Go style guide.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcWGUk5EhCYwJGAQOe5X9JPUof0vY%2BcD2%3D5pau%2B2tHhsvA%40mail.gmail.com.

Reply via email to