From: Jes Cok Date: Wed, 29 Oct 2025 07:59:22 +0000 (+0000) Subject: runtime: tweak example code for gorecover X-Git-Tag: go1.26rc1~429 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=32ee3f3f73dc09f1981d295963bd705b6b9941da;p=gostls13.git runtime: tweak example code for gorecover Change-Id: Ie545610fab008f7855bcb1a608f98e0c5109ec20 GitHub-Last-Rev: 66401b913ad8e85c1dc6c9c0e785f57d5dc5c47e GitHub-Pull-Request: golang/go#76100 Reviewed-on: https://go-review.googlesource.com/c/go/+/716040 Auto-Submit: Keith Randall Reviewed-by: Keith Randall LUCI-TryBot-Result: Go LUCI Reviewed-by: Michael Knyszek Reviewed-by: Keith Randall --- diff --git a/src/runtime/panic.go b/src/runtime/panic.go index 8c91c9435a..175452fec9 100644 --- a/src/runtime/panic.go +++ b/src/runtime/panic.go @@ -1108,7 +1108,7 @@ func gorecover() any { // frame between gopanic and gorecover. // // We don't recover this: - // defer func() { func() { recover() }() } + // defer func() { func() { recover() }() }() // because there are 2 non-wrapper frames. // // We don't recover this: