summaryrefslogtreecommitdiff
path: root/src/flag
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2016-03-01 23:21:55 +0000
committerBrad Fitzpatrick <bradfitz@golang.org>2016-03-02 00:13:47 +0000
commit5fea2ccc77eb50a9704fa04b7c61755fe34e1d95 (patch)
tree00137f90183ae2a01ca42249e04e9e4dabdf6249 /src/flag
parent8b4deb448e587802f67930b765c9598fc8cd36e5 (diff)
downloadgo-git-5fea2ccc77eb50a9704fa04b7c61755fe34e1d95.tar.gz
all: single space after period.
The tree's pretty inconsistent about single space vs double space after a period in documentation. Make it consistently a single space, per earlier decisions. This means contributors won't be confused by misleading precedence. This CL doesn't use go/doc to parse. It only addresses // comments. It was generated with: $ perl -i -npe 's,^(\s*// .+[a-z]\.) +([A-Z]),$1 $2,' $(git grep -l -E '^\s*//(.+\.) +([A-Z])') $ go test go/doc -update Change-Id: Iccdb99c37c797ef1f804a94b22ba5ee4b500c4f7 Reviewed-on: https://go-review.googlesource.com/20022 Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: Dave Day <djd@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/flag')
-rw-r--r--src/flag/flag.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/flag/flag.go b/src/flag/flag.go
index 3abc80e9c6..6acbbcd321 100644
--- a/src/flag/flag.go
+++ b/src/flag/flag.go
@@ -261,7 +261,7 @@ const (
PanicOnError // Call panic with a descriptive error.
)
-// A FlagSet represents a set of defined flags. The zero value of a FlagSet
+// A FlagSet represents a set of defined flags. The zero value of a FlagSet
// has no name and has ContinueOnError error handling.
type FlagSet struct {
// Usage is the function called when an error occurs while parsing flags.
@@ -324,7 +324,7 @@ func (f *FlagSet) VisitAll(fn func(*Flag)) {
}
// VisitAll visits the command-line flags in lexicographical order, calling
-// fn for each. It visits all flags, even those not set.
+// fn for each. It visits all flags, even those not set.
func VisitAll(fn func(*Flag)) {
CommandLine.VisitAll(fn)
}
@@ -338,7 +338,7 @@ func (f *FlagSet) Visit(fn func(*Flag)) {
}
// Visit visits the command-line flags in lexicographical order, calling fn
-// for each. It visits only those flags that have been set.
+// for each. It visits only those flags that have been set.
func Visit(fn func(*Flag)) {
CommandLine.Visit(fn)
}
@@ -514,7 +514,7 @@ func (f *FlagSet) NFlag() int { return len(f.actual) }
// NFlag returns the number of command-line flags that have been set.
func NFlag() int { return len(CommandLine.actual) }
-// Arg returns the i'th argument. Arg(0) is the first remaining argument
+// Arg returns the i'th argument. Arg(0) is the first remaining argument
// after flags have been processed. Arg returns an empty string if the
// requested element does not exist.
func (f *FlagSet) Arg(i int) string {
@@ -524,7 +524,7 @@ func (f *FlagSet) Arg(i int) string {
return f.args[i]
}
-// Arg returns the i'th command-line argument. Arg(0) is the first remaining argument
+// Arg returns the i'th command-line argument. Arg(0) is the first remaining argument
// after flags have been processed. Arg returns an empty string if the
// requested element does not exist.
func Arg(i int) string {
@@ -890,7 +890,7 @@ func (f *FlagSet) parseOne() (bool, error) {
}
// Parse parses flag definitions from the argument list, which should not
-// include the command name. Must be called after all flags in the FlagSet
+// include the command name. Must be called after all flags in the FlagSet
// are defined and before flags are accessed by the program.
// The return value will be ErrHelp if -help or -h were set but not defined.
func (f *FlagSet) Parse(arguments []string) error {