From b9df8df70fde84bd13558011bad6dfbbeb714599 Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Thu, 18 Jul 2019 17:41:45 -0400 Subject: [PATCH] doc/go1.13: mention the effect of testing.Init on package initialization MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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í --- doc/go1.13.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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.

-- 2.50.0