From: Julian Dax Date: Sun, 7 Jul 2024 21:41:02 +0000 (+0200) Subject: testing: remove call to os.Exit in documentation for TestMain X-Git-Tag: go1.23rc2~2^2~16 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=87ec2c959c;p=gostls13.git testing: remove call to os.Exit in documentation for TestMain In the example for the TestMain function, os.Exit was called explicitly, which is no longer necessary since Go 1.15 (see change #219639). Updates #34129 Change-Id: Ia8021de0d5699742adbb7ab6d28b11c841e596dc Reviewed-on: https://go-review.googlesource.com/c/go/+/596977 Reviewed-by: Ian Lance Taylor Reviewed-by: Damien Neil Auto-Submit: Ian Lance Taylor LUCI-TryBot-Result: Go LUCI --- diff --git a/src/testing/testing.go b/src/testing/testing.go index 200fa659b8..526cba39f8 100644 --- a/src/testing/testing.go +++ b/src/testing/testing.go @@ -362,7 +362,7 @@ // // func TestMain(m *testing.M) { // // call flag.Parse() here if TestMain uses flags -// os.Exit(m.Run()) +// m.Run() // } // // TestMain is a low-level primitive and should not be necessary for casual