From 32ee3f3f73dc09f1981d295963bd705b6b9941da Mon Sep 17 00:00:00 2001 From: Jes Cok Date: Wed, 29 Oct 2025 07:59:22 +0000 Subject: [PATCH] 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 --- src/runtime/panic.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/panic.go b/src/runtime/panic.go index 8c91c9435ab..175452fec9c 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: