Skip to content

Commit 32ee3f3

Browse files
callthingsoffgopherbot
authored andcommitted
runtime: tweak example code for gorecover
Change-Id: Ie545610fab008f7855bcb1a608f98e0c5109ec20 GitHub-Last-Rev: 66401b9 GitHub-Pull-Request: #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>
1 parent da3fb90 commit 32ee3f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/panic.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1108,7 +1108,7 @@ func gorecover() any {
11081108
// frame between gopanic and gorecover.
11091109
//
11101110
// We don't recover this:
1111-
// defer func() { func() { recover() }() }
1111+
// defer func() { func() { recover() }() }()
11121112
// because there are 2 non-wrapper frames.
11131113
//
11141114
// We don't recover this:

0 commit comments

Comments
 (0)