aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/testdata/script/work.txt
diff options
context:
space:
mode:
authorMichael Matloob <matloob@golang.org>2021-06-14 19:22:58 -0400
committerMichael Matloob <matloob@golang.org>2021-07-27 21:27:13 +0000
commitb2205eab0efef6cba784aca4436cb0ef8ac0a4de (patch)
tree08d00ae3db06b43147ebad0eef605de72b97d88f /src/cmd/go/testdata/script/work.txt
parentf05f5ceffa6edec89436a825176eefdd1fe828e5 (diff)
downloadgo-b2205eab0efef6cba784aca4436cb0ef8ac0a4de.tar.gz
go-b2205eab0efef6cba784aca4436cb0ef8ac0a4de.zip
[dev.cmdgo] cmd/go: add go mod initwork command
This command is used to create a go.work file with a set of modules given in the arguments to the command. For #45713 Change-Id: I09f8cefc5849dd43c234dc4a37091791fcc02ebe Reviewed-on: https://go-review.googlesource.com/c/go/+/334936 Trust: Michael Matloob <matloob@golang.org> Run-TryBot: Michael Matloob <matloob@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
Diffstat (limited to 'src/cmd/go/testdata/script/work.txt')
-rw-r--r--src/cmd/go/testdata/script/work.txt10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/cmd/go/testdata/script/work.txt b/src/cmd/go/testdata/script/work.txt
index f2b51ca629..c68ca89a76 100644
--- a/src/cmd/go/testdata/script/work.txt
+++ b/src/cmd/go/testdata/script/work.txt
@@ -1,3 +1,6 @@
+go mod initwork ./a ./b
+cmp go.work go.work.want
+
go run example.com/b
stdout 'Hello from module A'
@@ -31,14 +34,13 @@ directory (
b
../src/a
)
--- go.work --
+-- go.work.want --
go 1.17
directory (
- ./a
- ./b
+ ./a
+ ./b
)
-
-- a/go.mod --
module example.com/a