Skip to content

Commit 6a94eb3

Browse files
dunglaspull[bot]
authored andcommitted
cmd/cgo: update outdated docs about cgocheck2
Setting GODEBUG=cgocheck=2 now panics with a message such as "fatal error: cgocheck > 1 mode is no longer supported at runtime. Use GOEXPERIMENT=cgocheck2 at build time instead." Change-Id: If9a5a96933973e14a1a60b8e9fb6a1f4a818cf59 GitHub-Last-Rev: 787d624 GitHub-Pull-Request: #65224 Reviewed-on: https://go-review.googlesource.com/c/go/+/557597 Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: qiulaidongfeng <[email protected]> Reviewed-by: Keith Randall <[email protected]> Reviewed-by: Keith Randall <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent 4c7949e commit 6a94eb3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cmd/cgo/doc.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,8 @@ controlled by the cgocheck setting of the GODEBUG environment
402402
variable. The default setting is GODEBUG=cgocheck=1, which implements
403403
reasonably cheap dynamic checks. These checks may be disabled
404404
entirely using GODEBUG=cgocheck=0. Complete checking of pointer
405-
handling, at some cost in run time, is available via GODEBUG=cgocheck=2.
405+
handling, at some cost in run time, is available by setting
406+
GOEXPERIMENT=cgocheck2 at build time.
406407
407408
It is possible to defeat this enforcement by using the unsafe package,
408409
and of course there is nothing stopping the C code from doing anything

0 commit comments

Comments
 (0)