From e8422e9a5aa9ca3140c96f7abfa4fa4482d709ab Mon Sep 17 00:00:00 2001 From: Ariel Otilibili Date: Sat, 6 Dec 2025 11:20:50 +0100 Subject: [PATCH] cmd/cgo: improve documentation Add a link to runtime/cgo.Handle in documentation. Link: https://pkg.go.dev/runtime/cgo#Handle --- src/cmd/cgo/doc.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmd/cgo/doc.go b/src/cmd/cgo/doc.go index 7e8486874ef142..47d243d1a16190 100644 --- a/src/cmd/cgo/doc.go +++ b/src/cmd/cgo/doc.go @@ -425,8 +425,8 @@ and of course there is nothing stopping the C code from doing anything it likes. However, programs that break these rules are likely to fail in unexpected and unpredictable ways. -The runtime/cgo.Handle type can be used to safely pass Go values -between Go and C. See the runtime/cgo package documentation for details. +The type [runtime/cgo.Handle] can be used to safely pass Go values +between Go and C. Note: the current implementation has a bug. While Go code is permitted to write nil or a C pointer (but not a Go pointer) to C memory, the