]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: add links to workspaces reference and tutorial to go help work
authorMichael Matloob <matloob@golang.org>
Thu, 3 Mar 2022 21:18:31 +0000 (16:18 -0500)
committerMichael Matloob <matloob@golang.org>
Thu, 3 Mar 2022 23:43:05 +0000 (23:43 +0000)
For #45713

Change-Id: Ia2901cbfc5deb52503e74fcf9dff26a56ec582c3
Reviewed-on: https://go-review.googlesource.com/c/go/+/389297
Trust: Michael Matloob <matloob@golang.org>
Run-TryBot: Michael Matloob <matloob@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/cmd/go/alldocs.go
src/cmd/go/internal/workcmd/edit.go
src/cmd/go/internal/workcmd/init.go
src/cmd/go/internal/workcmd/sync.go
src/cmd/go/internal/workcmd/use.go
src/cmd/go/internal/workcmd/work.go

index b4fb282303c7c21f071e182515b76b6292451763..825de1e64a86f0fef0a1813ee64b10a924125d8c 100644 (file)
 //
 // Workspace maintenance
 //
-// Go workspace provides access to operations on workspaces.
+// Work provides access to operations on workspaces.
 //
 // Note that support for workspaces is built into many other commands, not
 // just 'go work'.
 // See 'go help modules' for information about Go's module system of which
 // workspaces are a part.
 //
+// See https://go.dev/ref/mod#workspaces for an in-depth reference on
+// workspaces.
+//
+// See https://go.dev/doc/tutorial/workspaces for an introductory
+// tutorial on workspaces.
+//
 // A workspace is specified by a go.work file that specifies a set of
 // module directories with the "use" directive. These modules are used as
 // root modules by the go command for builds and related operations.  A
 //             Version string
 //     }
 //
-// See the workspaces design proposal at
-// https://go.googlesource.com/proposal/+/master/design/45713-workspace.md for
-// more information.
+// See the workspaces reference at https://go.dev/ref/mod#workspaces
+// for more information.
 //
 //
 // Initialize workspace file
 // Each argument path is added to a use directive in the go.work file. The
 // current go version will also be listed in the go.work file.
 //
+// See the workspaces reference at https://go.dev/ref/mod#workspaces
+// for more information.
+//
 //
 // Sync workspace build list to modules
 //
 // build list's version of each module is always the same or higher than
 // that in each workspace module.
 //
+// See the workspaces reference at https://go.dev/ref/mod#workspaces
+// for more information.
+//
 //
 // Add modules to workspace file
 //
 // were specified as arguments: namely, use directives will be added for
 // directories that exist, and removed for directories that do not exist.
 //
+// See the workspaces reference at https://go.dev/ref/mod#workspaces
+// for more information.
+//
 //
 // Compile and run Go program
 //
index 05f4f3dddfc49fb0cd35fd7d21a18be876bd7b4a..1478c19389fa1f98ca834c9ff4ffe7abd0608801 100644 (file)
@@ -84,9 +84,8 @@ writing it back to go.mod. The JSON output corresponds to these Go types:
                Version string
        }
 
-See the workspaces design proposal at
-https://go.googlesource.com/proposal/+/master/design/45713-workspace.md for
-more information.
+See the workspaces reference at https://go.dev/ref/mod#workspaces
+for more information.
 `,
 }
 
index 63bee6e4f50be99778b61ddb1630f8642435b030..c2513bac358479791d40b5f9753b793293b36dea 100644 (file)
@@ -27,6 +27,8 @@ modules will be created.
 Each argument path is added to a use directive in the go.work file. The
 current go version will also be listed in the go.work file.
 
+See the workspaces reference at https://go.dev/ref/mod#workspaces
+for more information.
 `,
        Run: runInit,
 }
index b0f61c5fa247c04e203347536b305a61ed0b41a8..7712eb6b6b8920a58b2a602355c2a9ec6abf386e 100644 (file)
@@ -33,6 +33,9 @@ if the dependency module's version is not already the same as the build
 list's version. Note that Minimal Version Selection guarantees that the
 build list's version of each module is always the same or higher than
 that in each workspace module.
+
+See the workspaces reference at https://go.dev/ref/mod#workspaces
+for more information.
 `,
        Run: runSync,
 }
index e4666ac26dab35c4a28fde3ac3ef82d884c1cfd9..e20041f79f1376d54be4f4ac369b108d893384e4 100644 (file)
@@ -33,6 +33,9 @@ The -r flag searches recursively for modules in the argument
 directories, and the use command operates as if each of the directories
 were specified as arguments: namely, use directives will be added for
 directories that exist, and removed for directories that do not exist.
+
+See the workspaces reference at https://go.dev/ref/mod#workspaces
+for more information.
 `,
 }
 
index d3cc250231ab7e325423da801283ef58bfe3c5d2..39c81e8f5dc05366ab38ad15f3d7d9379be45ee8 100644 (file)
@@ -12,7 +12,7 @@ import (
 var CmdWork = &base.Command{
        UsageLine: "go work",
        Short:     "workspace maintenance",
-       Long: `Go workspace provides access to operations on workspaces.
+       Long: `Work provides access to operations on workspaces.
 
 Note that support for workspaces is built into many other commands, not
 just 'go work'.
@@ -20,6 +20,12 @@ just 'go work'.
 See 'go help modules' for information about Go's module system of which
 workspaces are a part.
 
+See https://go.dev/ref/mod#workspaces for an in-depth reference on
+workspaces.
+
+See https://go.dev/doc/tutorial/workspaces for an introductory
+tutorial on workspaces.
+
 A workspace is specified by a go.work file that specifies a set of
 module directories with the "use" directive. These modules are used as
 root modules by the go command for builds and related operations.  A