diff options
| author | Russ Cox <rsc@golang.org> | 2019-05-14 13:38:15 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2019-05-16 03:25:00 +0000 |
| commit | 0c47e24df8c7066bf92a4acf96ec90f89825f2de (patch) | |
| tree | 20d47192b2389e581de244245726ef222b01c6f2 /src | |
| parent | 54260c570f1202b992b7b6ee8f837dd717927d24 (diff) | |
| download | go-0c47e24df8c7066bf92a4acf96ec90f89825f2de.tar.xz | |
cmd/go: rename renamed testing import
_go_testing is equally unlikely and much less concerning
than testing_xxxxxxxxxxxx if it appears in an error message
(as it does, for example, in https://storage.googleapis.com/go-build-log/0d543f89/linux-amd64_3467a10e.log).
Change-Id: I45dc3ebe2d3b6c9e53273cd21782ee11a53f5edb
Reviewed-on: https://go-review.googlesource.com/c/go/+/177197
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src')
| -rw-r--r-- | src/cmd/go/internal/load/test.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cmd/go/internal/load/test.go b/src/cmd/go/internal/load/test.go index f6ba994260..c247d56c81 100644 --- a/src/cmd/go/internal/load/test.go +++ b/src/cmd/go/internal/load/test.go @@ -626,8 +626,7 @@ func checkTestFunc(fn *ast.FuncDecl, arg string) error { var testinginitTmpl = lazytemplate.New("init", ` package {{.Name}} -{{/* Avoid a name collision with a name "testing" in user code. */}} -import testing_xxxxxxxxxxxx "testing" +import _go_testing "testing" {{/* Call testing.Init before any other user initialization code runs. @@ -636,7 +635,7 @@ This provides the illusion of the old behavior where testing flags were registered as part of the testing package's initialization. */}} var _ = func() bool { - testing_xxxxxxxxxxxx.Init() + _go_testing.Init() return true }() `) |
