diff options
author | Brad Fitzpatrick <bradfitz@golang.org> | 2016-03-01 23:21:55 +0000 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2016-03-02 00:13:47 +0000 |
commit | 5fea2ccc77eb50a9704fa04b7c61755fe34e1d95 (patch) | |
tree | 00137f90183ae2a01ca42249e04e9e4dabdf6249 /src/unicode | |
parent | 8b4deb448e587802f67930b765c9598fc8cd36e5 (diff) | |
download | go-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/unicode')
-rw-r--r-- | src/unicode/graphic.go | 2 | ||||
-rw-r--r-- | src/unicode/letter.go | 14 | ||||
-rw-r--r-- | src/unicode/maketables.go | 4 | ||||
-rw-r--r-- | src/unicode/utf8/utf8.go | 6 |
4 files changed, 13 insertions, 13 deletions
diff --git a/src/unicode/graphic.go b/src/unicode/graphic.go index 81eae3e762..ca6241949a 100644 --- a/src/unicode/graphic.go +++ b/src/unicode/graphic.go @@ -45,7 +45,7 @@ func IsGraphic(r rune) bool { // IsPrint reports whether the rune is defined as printable by Go. Such // characters include letters, marks, numbers, punctuation, symbols, and the // ASCII space character, from categories L, M, N, P, S and the ASCII space -// character. This categorization is the same as IsGraphic except that the +// character. This categorization is the same as IsGraphic except that the // only spacing character is ASCII space, U+0020. func IsPrint(r rune) bool { if uint32(r) <= MaxLatin1 { diff --git a/src/unicode/letter.go b/src/unicode/letter.go index 7fe4241edd..8443ee51a2 100644 --- a/src/unicode/letter.go +++ b/src/unicode/letter.go @@ -27,7 +27,7 @@ type RangeTable struct { LatinOffset int // number of entries in R16 with Hi <= MaxLatin1 } -// Range16 represents of a range of 16-bit Unicode code points. The range runs from Lo to Hi +// Range16 represents of a range of 16-bit Unicode code points. The range runs from Lo to Hi // inclusive and has the specified stride. type Range16 struct { Lo uint16 @@ -36,7 +36,7 @@ type Range16 struct { } // Range32 represents of a range of Unicode code points and is used when one or -// more of the values will not fit in 16 bits. The range runs from Lo to Hi +// more of the values will not fit in 16 bits. The range runs from Lo to Hi // inclusive and has the specified stride. Lo and Hi must always be >= 1<<16. type Range32 struct { Lo uint32 @@ -48,10 +48,10 @@ type Range32 struct { // code point to one code point) case conversion. // The range runs from Lo to Hi inclusive, with a fixed stride of 1. Deltas // are the number to add to the code point to reach the code point for a -// different case for that character. They may be negative. If zero, it +// different case for that character. They may be negative. If zero, it // means the character is in the corresponding case. There is a special // case representing sequences of alternating corresponding Upper and Lower -// pairs. It appears with a fixed Delta of +// pairs. It appears with a fixed Delta of // {UpperLower, UpperLower, UpperLower} // The constant UpperLower has an otherwise impossible delta value. type CaseRange struct { @@ -307,7 +307,7 @@ func (special SpecialCase) ToLower(r rune) rune { return r1 } -// caseOrbit is defined in tables.go as []foldPair. Right now all the +// caseOrbit is defined in tables.go as []foldPair. Right now all the // entries fit in uint16, so use uint16. If that changes, compilation // will fail (the constants in the composite literal will not fit in uint16) // and the types here can change to uint32. @@ -317,7 +317,7 @@ type foldPair struct { } // SimpleFold iterates over Unicode code points equivalent under -// the Unicode-defined simple case folding. Among the code points +// the Unicode-defined simple case folding. Among the code points // equivalent to rune (including rune itself), SimpleFold returns the // smallest rune > r if one exists, or else the smallest rune >= 0. // @@ -347,7 +347,7 @@ func SimpleFold(r rune) rune { return rune(caseOrbit[lo].To) } - // No folding specified. This is a one- or two-element + // No folding specified. This is a one- or two-element // equivalence class containing rune and ToLower(rune) // and ToUpper(rune) if they are different from rune. if l := ToLower(r); l != r { diff --git a/src/unicode/maketables.go b/src/unicode/maketables.go index e0110c9536..328c75ed63 100644 --- a/src/unicode/maketables.go +++ b/src/unicode/maketables.go @@ -485,7 +485,7 @@ func printCategories() { logger.Fatal("unknown category", name) } // We generate an UpperCase name to serve as concise documentation and an _UnderScored - // name to store the data. This stops godoc dumping all the tables but keeps them + // name to store the data. This stops godoc dumping all the tables but keeps them // available to clients. // Cases deserving special comments varDecl := "" @@ -964,7 +964,7 @@ func getCaseState(i rune) (c *caseState) { c._case = CaseTitle } // Some things such as roman numeral U+2161 don't describe themselves - // as upper case, but have a lower case. Second-guess them. + // as upper case, but have a lower case. Second-guess them. if c._case == CaseNone && ch.lowerCase != 0 { c._case = CaseUpper } diff --git a/src/unicode/utf8/utf8.go b/src/unicode/utf8/utf8.go index bbaf14aab8..9d35be6c06 100644 --- a/src/unicode/utf8/utf8.go +++ b/src/unicode/utf8/utf8.go @@ -341,7 +341,7 @@ func RuneLen(r rune) int { // EncodeRune writes into p (which must be large enough) the UTF-8 encoding of the rune. // It returns the number of bytes written. func EncodeRune(p []byte, r rune) int { - // Negative values are erroneous. Making it unsigned addresses the problem. + // Negative values are erroneous. Making it unsigned addresses the problem. switch i := uint32(r); { case i <= rune1Max: p[0] = byte(r) @@ -367,7 +367,7 @@ func EncodeRune(p []byte, r rune) int { } } -// RuneCount returns the number of runes in p. Erroneous and short +// RuneCount returns the number of runes in p. Erroneous and short // encodings are treated as single runes of width 1 byte. func RuneCount(p []byte) int { np := len(p) @@ -441,7 +441,7 @@ func RuneCountInString(s string) (n int) { } // RuneStart reports whether the byte could be the first byte of an encoded, -// possibly invalid rune. Second and subsequent bytes always have the top two +// possibly invalid rune. Second and subsequent bytes always have the top two // bits set to 10. func RuneStart(b byte) bool { return b&0xC0 != 0x80 } |