"Fossies" - the Fresh Open Source Software Archive

Member "go/doc/cmd.html" (9 Sep 2020, 2872 Bytes) of package /windows/misc/go1.14.9.windows-386.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) HTML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 <!--{
    2     "Title": "Command Documentation",
    3     "Path":  "/doc/cmd"
    4 }-->
    5 
    6 <p>
    7 There is a suite of programs to build and process Go source code.
    8 Instead of being run directly, programs in the suite are usually invoked
    9 by the <a href="/cmd/go/">go</a> program.
   10 </p>
   11 
   12 <p>
   13 The most common way to run these programs is as a subcommand of the go program,
   14 for instance as <code>go fmt</code>. Run like this, the command operates on
   15 complete packages of Go source code, with the go program invoking the
   16 underlying binary with arguments appropriate to package-level processing.
   17 </p>
   18 
   19 <p>
   20 The programs can also be run as stand-alone binaries, with unmodified arguments,
   21 using the go <code>tool</code> subcommand, such as <code>go tool cgo</code>.
   22 For most commands this is mainly useful for debugging.
   23 Some of the commands, such as <code>pprof</code>, are accessible only through
   24 the go <code>tool</code> subcommand.
   25 </p>
   26 
   27 <p>
   28 Finally the <code>fmt</code> and <code>godoc</code> commands are installed
   29 as regular binaries called <code>gofmt</code> and <code>godoc</code> because
   30 they are so often referenced.
   31 </p>
   32 
   33 <p>
   34 Click on the links for more documentation, invocation methods, and usage details.
   35 </p>
   36 
   37 <table class="dir">
   38 <tr>
   39 <th>Name</th>
   40 <th>&nbsp;&nbsp;&nbsp;&nbsp;</th>
   41 <th>Synopsis</th>
   42 </tr>
   43 
   44 <tr>
   45 <td><a href="/cmd/go/">go</a></td>
   46 <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   47 <td>
   48 The <code>go</code> program manages Go source code and runs the other
   49 commands listed here.
   50 See the command docs for usage
   51 details.
   52 <br><br>
   53 </td>
   54 </tr>
   55 
   56 <tr>
   57 <td><a href="/cmd/cgo/">cgo</a></td>
   58 <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   59 <td>Cgo enables the creation of Go packages that call C code.</td>
   60 </tr>
   61 
   62 <tr>
   63 <td><a href="/cmd/cover/">cover</a></td>
   64 <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   65 <td>Cover is a program for creating and analyzing the coverage profiles
   66 generated by <code>"go test -coverprofile"</code>.</td>
   67 </tr>
   68 
   69 <tr>
   70 <td><a href="/cmd/fix/">fix</a></td>
   71 <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   72 <td>Fix finds Go programs that use old features of the language and libraries
   73 and rewrites them to use newer ones.</td>
   74 </tr>
   75 
   76 <tr>
   77 <td><a href="/cmd/gofmt/">fmt</a></td>
   78 <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   79 <td>Fmt formats Go packages, it is also available as an independent <a href="/cmd/gofmt/">
   80 gofmt</a> command with more general options.</td>
   81 </tr>
   82 
   83 <tr>
   84 <td><a href="//godoc.org/golang.org/x/tools/cmd/godoc/">godoc</a></td>
   85 <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   86 <td>Godoc extracts and generates documentation for Go packages.</td>
   87 </tr>
   88 
   89 <tr>
   90 <td><a href="/cmd/vet/">vet</a></td>
   91 <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   92 <td>Vet examines Go source code and reports suspicious constructs, such as Printf
   93 calls whose arguments do not align with the format string.</td>
   94 </tr>
   95 
   96 </table>
   97 
   98 <p>
   99 This is an abridged list. See the <a href="/cmd/">full command reference</a>
  100 for documentation of the compilers and more.
  101 </p>