diff options
author | Russ Cox <rsc@golang.org> | 2022-01-29 15:58:19 -0500 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2022-03-16 16:06:15 +0000 |
commit | a3fcc755db54b89855519a5b3e3fb66ed9912497 (patch) | |
tree | 40d722dfa1930af1aa9bc50e4ea9a1cf05c9c213 /src/cmd/go/script_test.go | |
parent | 95395fdbe3e76778a9035d9478f52513fc34a97b (diff) | |
download | go-a3fcc755db54b89855519a5b3e3fb66ed9912497.tar.gz go-a3fcc755db54b89855519a5b3e3fb66ed9912497.zip |
internal/txtar: bring back to main repo, for tests in std
This used to be cmd/go/internal/txtar,
and then it was moved to golang.org/x/tools/txtar
and revendored from there into cmd/vendor/golang.org/x/tools/txtar.
We have a use for txtar in a new test in the standard library,
which cannot access cmd/vendor. But we also don't really want
to vendor it into the standard library as is, because that would
be the first vendoring of x/tools in std, and it would be better
to keep std separate from x/tools, even for testing.
Instead, since a little copying is better than a little dependency,
just make a copy in internal/txtar. The package does not change.
Having done that, replace the uses in cmd/go so that there's
only one copy in the main repo.
Change-Id: I70b5cc05da3f6ebcc0fd9052ebcb3d369fb57956
Reviewed-on: https://go-review.googlesource.com/c/go/+/384254
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/cmd/go/script_test.go')
-rw-r--r-- | src/cmd/go/script_test.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cmd/go/script_test.go b/src/cmd/go/script_test.go index eff2213525..90ab3a6501 100644 --- a/src/cmd/go/script_test.go +++ b/src/cmd/go/script_test.go @@ -15,6 +15,7 @@ import ( "fmt" "go/build" "internal/testenv" + "internal/txtar" "io/fs" "os" "os/exec" @@ -33,8 +34,6 @@ import ( "cmd/go/internal/robustio" "cmd/go/internal/work" "cmd/internal/sys" - - "golang.org/x/tools/txtar" ) var testSum = flag.String("testsum", "", `may be tidy, listm, or listall. If set, TestScript generates a go.sum file at the beginning of each test and updates test files if they pass.`) |