]> Cypherpunks.ru repositories - gostls13.git/commit
internal/txtar: bring back to main repo, for tests in std
authorRuss Cox <rsc@golang.org>
Sat, 29 Jan 2022 20:58:19 +0000 (15:58 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 16 Mar 2022 16:06:15 +0000 (16:06 +0000)
commita3fcc755db54b89855519a5b3e3fb66ed9912497
tree40d722dfa1930af1aa9bc50e4ea9a1cf05c9c213
parent95395fdbe3e76778a9035d9478f52513fc34a97b
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>
src/cmd/go/internal/fsys/fsys_test.go
src/cmd/go/proxy_test.go
src/cmd/go/script_test.go
src/cmd/go/testdata/addmod.go
src/cmd/go/testdata/savedir.go
src/cmd/go/testdata/script/README
src/cmd/vendor/modules.txt
src/go/build/deps_test.go
src/internal/txtar/archive.go [moved from src/cmd/vendor/golang.org/x/tools/txtar/archive.go with 100% similarity]