]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: avoid long lines in help messages
authorJeff R. Allen <jra@nella.org>
Thu, 23 Jul 2015 12:56:13 +0000 (14:56 +0200)
committerRob Pike <r@golang.org>
Tue, 28 Jul 2015 09:36:32 +0000 (09:36 +0000)
Reformat some help messages to stay within 80 characters.

Fixes #11840.

Change-Id: Iebafcb616f202ac44405e5897097492a79a51722
Reviewed-on: https://go-review.googlesource.com/12514
Reviewed-by: Rob Pike <r@golang.org>
src/cmd/go/alldocs.go
src/cmd/go/doc.go
src/cmd/go/run.go

index b5d260a7e8f20a2cb1cd0934c4a89581b11b7e74..20ae55d4908461e9a2bc8572ea370dfa93cc4ec6 100644 (file)
@@ -204,8 +204,8 @@ Usage:
 
 Doc prints the documentation comments associated with the item identified by its
 arguments (a package, const, func, type, var, or method) followed by a one-line
-summary of each of the first-level items "under" that item (package-level declarations
-for a package, methods for a type, etc.).
+summary of each of the first-level items "under" that item (package-level
+declarations for a package, methods for a type, etc.).
 
 Doc accepts zero, one, or two arguments.
 
@@ -213,30 +213,31 @@ Given no arguments, that is, when run as
 
        go doc
 
-it prints the package documentation for the package in the current directory.  If
-the package is a command (package main), the exported symbols of the package are
-elided from the presentation unless the -cmd flag is provided.
+it prints the package documentation for the package in the current directory.
+If the package is a command (package main), the exported symbols of the package
+are elided from the presentation unless the -cmd flag is provided.
 
-When run with one argument, the argument is treated as a Go-syntax-like representation
-of the item to be documented. What the argument selects depends on what is installed
-in GOROOT and GOPATH, as well as the form of the argument, which is schematically
-one of these:
+When run with one argument, the argument is treated as a Go-syntax-like
+representation of the item to be documented. What the argument selects depends
+on what is installed in GOROOT and GOPATH, as well as the form of the argument,
+which is schematically one of these:
 
        go doc <pkg>
        go doc <sym>[.<method>]
        go doc [<pkg>].<sym>[.<method>]
 
-The first item in this list matched by the argument is the one whose documentation
-is printed. (See the examples below.) For packages, the order of scanning is
-determined lexically, but the GOROOT tree is always scanned before GOPATH.
+The first item in this list matched by the argument is the one whose
+documentation is printed. (See the examples below.) For packages, the order of
+scanning is determined lexically, but the GOROOT tree is always scanned before
+GOPATH.
 
-If there is no package specified or matched, the package in the current directory
-is selected, so "go doc Foo" shows the documentation for symbol Foo in the current
-package.
+If there is no package specified or matched, the package in the current
+directory is selected, so "go doc Foo" shows the documentation for symbol Foo in
+the current package.
 
-The package path must be either a qualified path or a proper suffix of a path. The
-go tool's usual package mechanism does not apply: package path elements like . and
-... are not implemented by go doc.
+The package path must be either a qualified path or a proper suffix of a
+path. The go tool's usual package mechanism does not apply: package path
+elements like . and ... are not implemented by go doc.
 
 When run with two arguments, the first must be a full package path (not just a
 suffix), and the second is a symbol or symbol and method; this is similar to the
@@ -254,7 +255,8 @@ Examples:
                Show documentation for current package.
        go doc Foo
                Show documentation for Foo in the current package.
-               (Foo starts with a capital letter so it cannot match a package path.)
+               (Foo starts with a capital letter so it cannot match
+               a package path.)
        go doc encoding/json
                Show documentation for the encoding/json package.
        go doc json
@@ -621,7 +623,8 @@ Run compiles and runs the main package comprising the named Go source files.
 A Go source file is defined to be a file ending in a literal ".go" suffix.
 
 By default, 'go run' runs the compiled binary directly: 'a.out arguments...'.
-If the -exec flag is given, 'go run' invokes the binary using xprog: 'xprog a.out arguments...'.
+If the -exec flag is given, 'go run' invokes the binary using xprog:
+       'xprog a.out arguments...'.
 If the -exec flag is not given, GOOS or GOARCH is different from the system
 default, and a program named go_$GOOS_$GOARCH_exec can be found
 on the current search path, 'go run' invokes the binary using that program,
index 03c950552e6689d53013c1e712dff21514bcd214..4a07dfe11f4e76a76a3aa6feceaa55c964ccf367 100644 (file)
@@ -10,11 +10,10 @@ var cmdDoc = &Command{
        CustomFlags: true,
        Short:       "show documentation for package or symbol",
        Long: `
-
 Doc prints the documentation comments associated with the item identified by its
 arguments (a package, const, func, type, var, or method) followed by a one-line
-summary of each of the first-level items "under" that item (package-level declarations
-for a package, methods for a type, etc.).
+summary of each of the first-level items "under" that item (package-level
+declarations for a package, methods for a type, etc.).
 
 Doc accepts zero, one, or two arguments.
 
@@ -22,30 +21,31 @@ Given no arguments, that is, when run as
 
        go doc
 
-it prints the package documentation for the package in the current directory.  If
-the package is a command (package main), the exported symbols of the package are
-elided from the presentation unless the -cmd flag is provided.
+it prints the package documentation for the package in the current directory.
+If the package is a command (package main), the exported symbols of the package
+are elided from the presentation unless the -cmd flag is provided.
 
-When run with one argument, the argument is treated as a Go-syntax-like representation
-of the item to be documented. What the argument selects depends on what is installed
-in GOROOT and GOPATH, as well as the form of the argument, which is schematically
-one of these:
+When run with one argument, the argument is treated as a Go-syntax-like
+representation of the item to be documented. What the argument selects depends
+on what is installed in GOROOT and GOPATH, as well as the form of the argument,
+which is schematically one of these:
 
        go doc <pkg>
        go doc <sym>[.<method>]
        go doc [<pkg>].<sym>[.<method>]
 
-The first item in this list matched by the argument is the one whose documentation
-is printed. (See the examples below.) For packages, the order of scanning is
-determined lexically, but the GOROOT tree is always scanned before GOPATH.
+The first item in this list matched by the argument is the one whose
+documentation is printed. (See the examples below.) For packages, the order of
+scanning is determined lexically, but the GOROOT tree is always scanned before
+GOPATH.
 
-If there is no package specified or matched, the package in the current directory
-is selected, so "go doc Foo" shows the documentation for symbol Foo in the current
-package.
+If there is no package specified or matched, the package in the current
+directory is selected, so "go doc Foo" shows the documentation for symbol Foo in
+the current package.
 
-The package path must be either a qualified path or a proper suffix of a path. The
-go tool's usual package mechanism does not apply: package path elements like . and
-... are not implemented by go doc.
+The package path must be either a qualified path or a proper suffix of a
+path. The go tool's usual package mechanism does not apply: package path
+elements like . and ... are not implemented by go doc.
 
 When run with two arguments, the first must be a full package path (not just a
 suffix), and the second is a symbol or symbol and method; this is similar to the
@@ -63,7 +63,8 @@ Examples:
                Show documentation for current package.
        go doc Foo
                Show documentation for Foo in the current package.
-               (Foo starts with a capital letter so it cannot match a package path.)
+               (Foo starts with a capital letter so it cannot match
+               a package path.)
        go doc encoding/json
                Show documentation for the encoding/json package.
        go doc json
index 6a04a9e19da9451a697e52b5e1451826cb2d38bd..f6da373e2522d4b491a58af224859e8d862f39d9 100644 (file)
@@ -37,7 +37,8 @@ Run compiles and runs the main package comprising the named Go source files.
 A Go source file is defined to be a file ending in a literal ".go" suffix.
 
 By default, 'go run' runs the compiled binary directly: 'a.out arguments...'.
-If the -exec flag is given, 'go run' invokes the binary using xprog: 'xprog a.out arguments...'.
+If the -exec flag is given, 'go run' invokes the binary using xprog:
+       'xprog a.out arguments...'.
 If the -exec flag is not given, GOOS or GOARCH is different from the system
 default, and a program named go_$GOOS_$GOARCH_exec can be found
 on the current search path, 'go run' invokes the binary using that program,