From: Bryan C. Mills
Date: Thu, 18 Jul 2019 21:41:45 +0000 (-0400)
Subject: doc/go1.13: mention the effect of testing.Init on package initialization
X-Git-Tag: go1.13rc1~74
X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b9df8df70fde84bd13558011bad6dfbbeb714599;p=gostls13.git
doc/go1.13: mention the effect of testing.Init on package initialization
Fixes #31859
Change-Id: I228ed93f9466d1a22f8796964f5d2f056ab9b62f
Reviewed-on: https://go-review.googlesource.com/c/go/+/186818
Run-TryBot: Bryan C. Mills
TryBot-Result: Gobot Gobot
Reviewed-by: Ian Lance Taylor
Reviewed-by: Caleb Spare
Reviewed-by: Daniel MartÃ
---
diff --git a/doc/go1.13.html b/doc/go1.13.html
index 11190a1611..9dead688c2 100644
--- a/doc/go1.13.html
+++ b/doc/go1.13.html
@@ -841,8 +841,10 @@ godoc
- Testing flags are now registered in the new Init
function.
- As a result, testing flags are now only registered when running a test binary.
+ Testing flags are now registered in the new Init
function,
+ which is invoked by the generated main
function for the test.
+ As a result, testing flags are now only registered when running a test binary,
+ and packages that call flag.Parse
during package initialization may cause tests to fail.