aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/alldocs.go
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2023-02-15 16:45:14 -0500
committerGopher Robot <gobot@golang.org>2023-02-27 21:45:11 +0000
commit676794f73e6ca8fbd7ec14f4185625efda4e2ca8 (patch)
tree8643cd08876754981f5a7a13c2032ca206c4b29f /src/cmd/go/alldocs.go
parent85d54a7667c12ea2320f43b24129a68f020ac095 (diff)
downloadgo-676794f73e6ca8fbd7ec14f4185625efda4e2ca8.tar.gz
go-676794f73e6ca8fbd7ec14f4185625efda4e2ca8.zip
cmd/go: convert mkalldocs.sh to a Go program
mkalldocs.sh required a Unix shell, making it less accessible for contributors on Windows. It also used a substantially different codepath to regenerate the file than the one used to check the file for staleness, making failures in TestDocsUpToDate more complex to diagnose. We can solve both of those problems by using the same technique as in checkScriptReadme: use the test itself as the generator to update the file. The test is already written in Go, the test binary already knows how to mimic the 'go' command, and this approach brings the difference between the test and the generator down to a single flag check. Updates #26735. Change-Id: I7c6f65cb0e0c29e334e38a45412e0a73c4d31d42 Reviewed-on: https://go-review.googlesource.com/c/go/+/468636 Reviewed-by: Alan Donovan <adonovan@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Bryan Mills <bcmills@google.com> Auto-Submit: Bryan Mills <bcmills@google.com>
Diffstat (limited to 'src/cmd/go/alldocs.go')
-rw-r--r--src/cmd/go/alldocs.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go
index 0f8433efca..fe17709016 100644
--- a/src/cmd/go/alldocs.go
+++ b/src/cmd/go/alldocs.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Code generated by mkalldocs.sh; DO NOT EDIT.
+// Code generated by 'go test cmd/go -v -run=TestDocsUpToDate -fixdocs'; DO NOT EDIT.
// Edit the documentation in other files and rerun mkalldocs.sh to generate this one.
// Go is a tool for managing Go source code.