151668c694
This change decouples the script engine from both cmd/go and the testing package; I intend to reuse it in the replacement for the vcs-test.golang.org server. This change also adds a few new script commands: - 'echo' echoes its arguments, useful for verifying argument expansion. - 'cat' prints the contents of files, useful for debugging failing script tests. - 'help' displays information about script commands and conditions, reducing the toil of maintaining lists in the README file. The 'cmp' and 'cmpenv' commands now use internal/diff instead of their own separate diff implementation. The 'env' command now writes to the script log instead of the stdout buffer. (This makes it more consistent with the behavior of other synchronous builtins.) The 'stale' command no longer logs output when a target is unexpectedly non-stale. (However, the ouput of the 'stale' command is not usually very useful anyway.) The 'grep', 'stdout', and 'stderr' commands now display matching lines (like Unix 'grep'), making their negation behavior more consistent with running real commands on a command-line. Likewise, the 'cmp' command now always displays differences. That makes it useful with the '?' prefix to produce diffs for informational purposes while debugging. For #27494. Change-Id: If49fd81d9b922d07c20618a8e2cef908191f9ef6 Reviewed-on: https://go-review.googlesource.com/c/go/+/419875 Reviewed-by: Russ Cox <rsc@golang.org> Auto-Submit: Bryan Mills <bcmills@google.com> Run-TryBot: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> |
||
---|---|---|
.github | ||
api | ||
doc | ||
lib/time | ||
misc | ||
src | ||
test | ||
.gitattributes | ||
.gitignore | ||
codereview.cfg | ||
CONTRIBUTING.md | ||
LICENSE | ||
PATENTS | ||
README.md | ||
SECURITY.md |
The Go Programming Language
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Download and Install
Binary Distributions
Official binary distributions are available at https://go.dev/dl/.
After downloading a binary release, visit https://go.dev/doc/install for installation instructions.
Install From Source
If a binary distribution is not available for your combination of operating system and architecture, visit https://go.dev/doc/install/source for source installation instructions.
Contributing
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://go.dev/wiki/Questions for a list of places to ask questions about the Go language.