Commit 7ab5e0c5 authored by Ian Lance Taylor's avatar Ian Lance Taylor

[release-branch.go1.12] doc: don't use "go tool vet" as an example

Updates #30199

Change-Id: Ib4586e3facb8c0985c8882482d94843b648b9d2f
Reviewed-on: https://go-review.googlesource.com/c/162257
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit ffd096db)
Reviewed-on: https://go-review.googlesource.com/c/162238Reviewed-by: default avatarAndrew Bonventre <andybons@golang.org>
parent 1af509d4
...@@ -18,10 +18,8 @@ underlying binary with arguments appropriate to package-level processing. ...@@ -18,10 +18,8 @@ underlying binary with arguments appropriate to package-level processing.
<p> <p>
The programs can also be run as stand-alone binaries, with unmodified arguments, The programs can also be run as stand-alone binaries, with unmodified arguments,
using the go <code>tool</code> subcommand, such as <code>go tool vet</code>. using the go <code>tool</code> subcommand, such as <code>go tool cgo</code>.
This style of invocation allows, for instance, checking a single source file For most commands this is mainly useful for debugging.
rather than an entire package: <code>go tool vet myprogram.go</code> as
compared to <code>go vet mypackage</code>.
Some of the commands, such as <code>pprof</code>, are accessible only through Some of the commands, such as <code>pprof</code>, are accessible only through
the go <code>tool</code> subcommand. the go <code>tool</code> subcommand.
</p> </p>
...@@ -76,7 +74,7 @@ and rewrites them to use newer ones.</td> ...@@ -76,7 +74,7 @@ and rewrites them to use newer ones.</td>
</tr> </tr>
<tr> <tr>
<td><a href="/cmd/go/">fmt</a></td> <td><a href="/cmd/gofmt/">fmt</a></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>Fmt formats Go packages, it is also available as an independent <a href="/cmd/gofmt/"> <td>Fmt formats Go packages, it is also available as an independent <a href="/cmd/gofmt/">
gofmt</a> command with more general options.</td> gofmt</a> command with more general options.</td>
......
...@@ -349,15 +349,7 @@ provides <b>essential setup instructions</b> for using the Go tools. ...@@ -349,15 +349,7 @@ provides <b>essential setup instructions</b> for using the Go tools.
<p> <p>
The source code for several Go tools (including <a href="/cmd/godoc/">godoc</a>) The source code for several Go tools (including <a href="/cmd/godoc/">godoc</a>)
is kept in <a href="https://golang.org/x/tools">the go.tools repository</a>. is kept in <a href="https://golang.org/x/tools">the go.tools repository</a>.
To install all of them, run the <code>go</code> <code>get</code> command: To install one of the tools (<code>godoc</code> in this case):
</p>
<pre>
$ go get golang.org/x/tools/cmd/...
</pre>
<p>
Or if you just want to install a specific command (<code>godoc</code> in this case):
</p> </p>
<pre> <pre>
...@@ -374,16 +366,6 @@ You must also have a workspace (<code>GOPATH</code>) set up; ...@@ -374,16 +366,6 @@ You must also have a workspace (<code>GOPATH</code>) set up;
see <a href="/doc/code.html">How to Write Go Code</a> for the details. see <a href="/doc/code.html">How to Write Go Code</a> for the details.
</p> </p>
<p>
<b>Note</b>: The <code>go</code> command will install the <code>godoc</code>
binary to <code>$GOROOT/bin</code> (or <code>$GOBIN</code>) and the
<code>cover</code> and <code>vet</code> binaries to
<code>$GOROOT/pkg/tool/$GOOS_$GOARCH</code>.
You can access the latter commands with
"<code>go</code> <code>tool</code> <code>cover</code>" and
"<code>go</code> <code>tool</code> <code>vet</code>".
</p>
<h2 id="community">Community resources</h2> <h2 id="community">Community resources</h2>
<p> <p>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment