]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.24] runtime: Added usage example for the runtime.AddCleanup(...
authorAlexandr Primak <primak.aa@gmail.com>
Sat, 15 Feb 2025 13:52:57 +0000 (16:52 +0300)
committerCherry Mui <cherryyz@google.com>
Mon, 17 Mar 2025 21:36:28 +0000 (14:36 -0700)
commit4524009ba6daed1b0f0a800b90f5d3eecb7a395e
treea515c26509dcb3c275dc7631364385b42885c03a
parentbd1bc8a6e7a0238af94d176cd4fa9aabb7738d73
[release-branch.go1.24] runtime: Added usage example for the runtime.AddCleanup() function.

The existing description of the function lacks usage examples, which makes it difficult to understand, so I added one.

There is no open issue about this, since the implementation seems trivial.

For #72795
Fixes #72796

Change-Id: I96b29f0b21d1c7fda04128239633c8a2fc36fef2
Reviewed-on: https://go-review.googlesource.com/c/go/+/649995
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
(cherry picked from commit 4c75671871af56fa68076ee3741780e52726ec82)
Reviewed-on: https://go-review.googlesource.com/c/go/+/656815
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/runtime/example_test.go