Left: | ||
Right: |
OLD | NEW |
---|---|
1 // Copyright 2011 The Go Authors. All rights reserved. | 1 // Copyright 2011 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 /* | 5 /* |
6 Go is a tool for managing Go source code. | 6 Go is a tool for managing Go source code. |
7 | 7 |
8 Usage: | 8 Usage: |
9 | 9 |
10 go command [arguments] | 10 go command [arguments] |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
49 along with their dependencies, but it does not install the results. | 49 along with their dependencies, but it does not install the results. |
50 | 50 |
51 If the arguments are a list of .go files, build treats them as a list | 51 If the arguments are a list of .go files, build treats them as a list |
52 of source files specifying a single package. | 52 of source files specifying a single package. |
53 | 53 |
54 When the command line specifies a single main package, | 54 When the command line specifies a single main package, |
55 build writes the resulting executable to output. | 55 build writes the resulting executable to output. |
56 Otherwise build compiles the packages but discards the results, | 56 Otherwise build compiles the packages but discards the results, |
57 serving only as a check that the packages can be built. | 57 serving only as a check that the packages can be built. |
58 | 58 |
59 The -o flag specifies the output file name. If not specified, the | 59 The -o flag specifies the output file name. If not specified, the |
60 output file name depends on the arguments and derives from the name | 60 name is packagename.a (for a non-main package) or the base |
61 of the package, such as p.a for package p, unless p is 'main'. If | 61 name of the first source file (for a main package). |
62 the package is main and file names are provided, the file name | |
63 derives from the first file name mentioned, such as f1 for 'go build | |
64 f1.go f2.go'; with no files provided ('go build'), the output file | |
65 name is the base name of the containing directory. | |
r
2013/03/13 20:02:15
revert this change.
rsc
2013/03/13 20:55:35
Sorry, fixed. (The edit should have been made in b
| |
66 | 62 |
67 The build flags are shared by the build, install, run, and test commands: | 63 The build flags are shared by the build, install, run, and test commands: |
68 | 64 |
69 -a | 65 -a |
70 force rebuilding of packages that are already up-to-date. | 66 force rebuilding of packages that are already up-to-date. |
71 -n | 67 -n |
72 print the commands but do not run them. | 68 print the commands but do not run them. |
73 -o file | |
74 specify output file name; see description above. | |
r
2013/03/13 20:02:15
revert this deletion
rsc
2013/03/13 20:55:35
This deletion is actually correct, although I didn
| |
75 -p n | 69 -p n |
76 the number of builds that can be run in parallel. | 70 the number of builds that can be run in parallel. |
77 The default is the number of CPUs available. | 71 The default is the number of CPUs available. |
78 -v | 72 -v |
79 print the names of packages as they are compiled. | 73 print the names of packages as they are compiled. |
80 -work | 74 -work |
81 print the name of the temporary work directory and | 75 print the name of the temporary work directory and |
82 do not delete it when exiting. | 76 do not delete it when exiting. |
83 -x | 77 -x |
84 print the commands. | 78 print the commands. |
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
814 example function, at least one other function, type, variable, or constant | 808 example function, at least one other function, type, variable, or constant |
815 declaration, and no test or benchmark functions. | 809 declaration, and no test or benchmark functions. |
816 | 810 |
817 See the documentation of the testing package for more information. | 811 See the documentation of the testing package for more information. |
818 | 812 |
819 | 813 |
820 */ | 814 */ |
821 package main | 815 package main |
822 | 816 |
823 // NOTE: cmdDoc is in fmt.go. | 817 // NOTE: cmdDoc is in fmt.go. |
OLD | NEW |