From b8b84b789e4275aeea491dbdb50536facd1fa7d7 Mon Sep 17 00:00:00 2001 From: Sean Liao Date: Sun, 5 Oct 2025 19:21:59 +0100 Subject: [PATCH] cmd/go: clarify the -o testflag is only for copying the binary Fixes #74769 Change-Id: Iebbaea8fb1a25e30a541a827815def9e269a8135 Reviewed-on: https://go-review.googlesource.com/c/go/+/709255 LUCI-TryBot-Result: Go LUCI Reviewed-by: Michael Matloob Reviewed-by: Ian Alexander Reviewed-by: Michael Matloob --- src/cmd/go/alldocs.go | 2 +- src/cmd/go/internal/test/test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go index 1029d1e8c2..fe9b862073 100644 --- a/src/cmd/go/alldocs.go +++ b/src/cmd/go/alldocs.go @@ -1953,7 +1953,7 @@ // Also emits build output in JSON. See 'go help buildjson'. // // -o file -// Compile the test binary to the named file. +// Save a copy of the test binary to the named file. // The test still runs (unless -c or -i is specified). // If file ends in a slash or names an existing directory, // the test is written to pkg.test in that directory. diff --git a/src/cmd/go/internal/test/test.go b/src/cmd/go/internal/test/test.go index 44ee98feaa..b30b2abc0e 100644 --- a/src/cmd/go/internal/test/test.go +++ b/src/cmd/go/internal/test/test.go @@ -162,7 +162,7 @@ In addition to the build flags, the flags handled by 'go test' itself are: Also emits build output in JSON. See 'go help buildjson'. -o file - Compile the test binary to the named file. + Save a copy of the test binary to the named file. The test still runs (unless -c or -i is specified). If file ends in a slash or names an existing directory, the test is written to pkg.test in that directory. -- 2.52.0