]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go/internal/test: update documentation for the "go test" command
authorJulian Dax <julian.dax@posteo.de>
Mon, 15 Jul 2024 14:36:07 +0000 (16:36 +0200)
committerMichael Matloob <matloob@golang.org>
Tue, 30 Jul 2024 14:20:03 +0000 (14:20 +0000)
The documentation referred to the package's source root as $GOPATH, which is no longer correct.

Fixes #64303

Change-Id: I2ea113497975726468d4ee4f85e2cfcbea9a76d6
Reviewed-on: https://go-review.googlesource.com/c/go/+/598235
Reviewed-by: Julian Dax <julian.dax@posteo.de>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
src/cmd/go/alldocs.go
src/cmd/go/internal/test/test.go

index 75e6d65d0c98908696156cc607a44fc3d7a9077c..648aa67d054d30bdca27fd4365889c6db33fb56f 100644 (file)
 // the result is not cached. To disable test caching, use any test flag
 // or argument other than the cacheable flags. The idiomatic way to disable
 // test caching explicitly is to use -count=1. Tests that open files within
-// the package's source root (usually $GOPATH) or that consult environment
-// variables only match future runs in which the files and environment
-// variables are unchanged. A cached test result is treated as executing
-// in no time at all, so a successful package test result will be cached and
+// the package's module or that consult environment variables only
+// match future runs in which the files and environment variables are
+// unchanged. A cached test result is treated as executing in no time
+// at all, so a successful package test result will be cached and
 // reused regardless of -timeout setting.
 //
 // In addition to the build flags, the flags handled by 'go test' itself are:
index ff22e4a457d53043b63fe532a719e935455ff592..76635adc7e282dadb82bac421c5c7db0f005596f 100644 (file)
@@ -132,10 +132,10 @@ If a run of go test has any test or non-test flags outside this set,
 the result is not cached. To disable test caching, use any test flag
 or argument other than the cacheable flags. The idiomatic way to disable
 test caching explicitly is to use -count=1. Tests that open files within
-the package's source root (usually $GOPATH) or that consult environment
-variables only match future runs in which the files and environment
-variables are unchanged. A cached test result is treated as executing
-in no time at all, so a successful package test result will be cached and
+the package's module or that consult environment variables only
+match future runs in which the files and environment variables are
+unchanged. A cached test result is treated as executing in no time
+at all, so a successful package test result will be cached and
 reused regardless of -timeout setting.
 
 In addition to the build flags, the flags handled by 'go test' itself are: