]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: tweak example code for gorecover
authorJes Cok <xigua67damn@gmail.com>
Wed, 29 Oct 2025 07:59:22 +0000 (07:59 +0000)
committerGopher Robot <gobot@golang.org>
Wed, 29 Oct 2025 18:27:57 +0000 (11:27 -0700)
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 <khr@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Keith Randall <khr@google.com>
src/runtime/panic.go

index 8c91c9435abd18d81a644289480e3ec2c83e48bc..175452fec9c08bebd3213d72091f0e4a6b5ddea0 100644 (file)
@@ -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: