Skip to content

Commit

Permalink
[release-branch.go1.20] cmd/go/internal: update documentation of go t…
Browse files Browse the repository at this point in the history
…est and go generate

For #57050.
Fixes #60458.

Change-Id: I46cac667ff78ac171c878f4366f8f01f58f1d27d
GitHub-Last-Rev: 697c255
GitHub-Pull-Request: #57814
Reviewed-on: https://go-review.googlesource.com/c/go/+/461683
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
(cherry picked from commit 93d9035)
Reviewed-on: https://go-review.googlesource.com/c/go/+/499218
Run-TryBot: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
  • Loading branch information
shogohida authored and gopherbot committed May 30, 2023
1 parent 4b95fc1 commit b249ec5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/cmd/go/alldocs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/cmd/go/internal/generate/generate.go
Expand Up @@ -89,6 +89,11 @@ Go generate sets several variables when it runs the generator:
generator, containing the Go toolchain and standard library.
$DOLLAR
A dollar sign.
$PATH
The $PATH of the parent process, with $GOROOT/bin
placed at the beginning. This causes generators
that execute 'go' commands to use the same 'go'
as the parent 'go generate' command.
Other than variable substitution and quoted-string evaluation, no
special processing such as "globbing" is performed on the command
Expand Down
4 changes: 4 additions & 0 deletions src/cmd/go/internal/test/test.go
Expand Up @@ -86,6 +86,10 @@ standard output, even if the test printed them to its own standard
error. (The go command's standard error is reserved for printing
errors building the tests.)
The go command places $GOROOT/bin at the beginning of $PATH
in the test's environment, so that tests that execute
'go' commands use the same 'go' as the parent 'go test' command.
Go test runs in two different modes:
The first, called local directory mode, occurs when go test is
Expand Down

0 comments on commit b249ec5

Please sign in to comment.