diff options
| author | go101 <tapir.liu@gmail.com> | 2023-09-05 03:53:29 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-09-05 22:26:12 +0000 |
| commit | 972cc3e7c2c0a14fe2c88fc4264f293fc045745f (patch) | |
| tree | 29da37c5c8f0f064551e1711a34d53f2fb695454 /src | |
| parent | b6372114b234c779b2db5773721cf88c2289898f (diff) | |
| download | go-972cc3e7c2c0a14fe2c88fc4264f293fc045745f.tar.xz | |
testing: add doc to not call Init concurrently
Change-Id: I2e218805fbe4858be125df97bdaf921799315799
GitHub-Last-Rev: 32b798d75f7ec0f72e18a65932ad93d8e5f1040a
GitHub-Pull-Request: golang/go#62410
Reviewed-on: https://go-review.googlesource.com/c/go/+/525015
Auto-Submit: Ian Lance Taylor <iant@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/testing/testing.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/testing/testing.go b/src/testing/testing.go index fcf7048f23..1bc8aff00d 100644 --- a/src/testing/testing.go +++ b/src/testing/testing.go @@ -398,7 +398,7 @@ var initRan bool // the "go test" command before running test functions, so Init is only needed // when calling functions such as Benchmark without using "go test". // -// Init has no effect if it was already called. +// Init is not safe to call concurrently. It has no effect if it was already called. func Init() { if initRan { return |
