mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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 <iant@google.com> Reviewed-by: Damien Neil <dneil@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
6d89b38ed8
commit
87ec2c959c
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue