From 5fea2ccc77eb50a9704fa04b7c61755fe34e1d95 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Tue, 1 Mar 2016 23:21:55 +0000 Subject: 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 Reviewed-by: Dave Day Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- src/bytes/bytes.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/bytes/bytes.go') diff --git a/src/bytes/bytes.go b/src/bytes/bytes.go index b86824087e..8a4409cb6b 100644 --- a/src/bytes/bytes.go +++ b/src/bytes/bytes.go @@ -164,7 +164,7 @@ func IndexRune(s []byte, r rune) int { // IndexAny interprets s as a sequence of UTF-8-encoded Unicode code points. // It returns the byte index of the first occurrence in s of any of the Unicode -// code points in chars. It returns -1 if chars is empty or if there is no code +// code points in chars. It returns -1 if chars is empty or if there is no code // point in common. func IndexAny(s []byte, chars string) int { if len(chars) > 0 { @@ -188,8 +188,8 @@ func IndexAny(s []byte, chars string) int { } // LastIndexAny interprets s as a sequence of UTF-8-encoded Unicode code -// points. It returns the byte index of the last occurrence in s of any of -// the Unicode code points in chars. It returns -1 if chars is empty or if +// points. It returns the byte index of the last occurrence in s of any of +// the Unicode code points in chars. It returns -1 if chars is empty or if // there is no code point in common. func LastIndexAny(s []byte, chars string) int { if len(chars) > 0 { @@ -276,7 +276,7 @@ func Fields(s []byte) [][]byte { // FieldsFunc interprets s as a sequence of UTF-8-encoded Unicode code points. // It splits the slice s at each run of code points c satisfying f(c) and -// returns a slice of subslices of s. If all code points in s satisfy f(c), or +// returns a slice of subslices of s. If all code points in s satisfy f(c), or // len(s) == 0, an empty slice is returned. // FieldsFunc makes no guarantees about the order in which it calls f(c). // If f does not return consistent results for a given c, FieldsFunc may crash. @@ -352,12 +352,12 @@ func HasSuffix(s, suffix []byte) bool { // Map returns a copy of the byte slice s with all its characters modified // according to the mapping function. If mapping returns a negative value, the character is -// dropped from the string with no replacement. The characters in s and the +// dropped from the string with no replacement. The characters in s and the // output are interpreted as UTF-8-encoded Unicode code points. func Map(mapping func(r rune) rune, s []byte) []byte { // In the worst case, the slice can grow when mapped, making - // things unpleasant. But it's so rare we barge in assuming it's - // fine. It could also shrink but that falls out naturally. + // things unpleasant. But it's so rare we barge in assuming it's + // fine. It could also shrink but that falls out naturally. maxbytes := len(s) // length of b nbytes := 0 // number of bytes encoded in b b := make([]byte, maxbytes) @@ -697,7 +697,7 @@ func EqualFold(s, t []byte) bool { return false } - // General case. SimpleFold(x) returns the next equivalent rune > x + // General case. SimpleFold(x) returns the next equivalent rune > x // or wraps around to smaller values. r := unicode.SimpleFold(sr) for r != sr && r < tr { @@ -709,6 +709,6 @@ func EqualFold(s, t []byte) bool { return false } - // One string is empty. Are both? + // One string is empty. Are both? return len(s) == len(t) } -- cgit v1.3-5-g9baa