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/sort | |
parent | 8b4deb448e587802f67930b765c9598fc8cd36e5 (diff) | |
download | go-5fea2ccc77eb50a9704fa04b7c61755fe34e1d95.tar.gz go-5fea2ccc77eb50a9704fa04b7c61755fe34e1d95.zip |
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/sort')
-rw-r--r-- | src/sort/search.go | 8 | ||||
-rw-r--r-- | src/sort/search_test.go | 2 | ||||
-rw-r--r-- | src/sort/sort.go | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/sort/search.go b/src/sort/search.go index de8178ff48..b9640a40af 100644 --- a/src/sort/search.go +++ b/src/sort/search.go @@ -8,10 +8,10 @@ package sort // Search uses binary search to find and return the smallest index i // in [0, n) at which f(i) is true, assuming that on the range [0, n), -// f(i) == true implies f(i+1) == true. That is, Search requires that +// f(i) == true implies f(i+1) == true. That is, Search requires that // f is false for some (possibly empty) prefix of the input range [0, n) // and then true for the (possibly empty) remainder; Search returns -// the first true index. If there is no such index, Search returns n. +// the first true index. If there is no such index, Search returns n. // (Note that the "not found" return value is not -1 as in, for instance, // strings.Index.) // Search calls f(i) only for i in the range [0, n). @@ -85,7 +85,7 @@ func SearchInts(a []int, x int) int { } // SearchFloat64s searches for x in a sorted slice of float64s and returns the index -// as specified by Search. The return value is the index to insert x if x is not +// as specified by Search. The return value is the index to insert x if x is not // present (it could be len(a)). // The slice must be sorted in ascending order. // @@ -94,7 +94,7 @@ func SearchFloat64s(a []float64, x float64) int { } // SearchStrings searches for x in a sorted slice of strings and returns the index -// as specified by Search. The return value is the index to insert x if x is not +// as specified by Search. The return value is the index to insert x if x is not // present (it could be len(a)). // The slice must be sorted in ascending order. // diff --git a/src/sort/search_test.go b/src/sort/search_test.go index 29b8d62dfe..ded68ebde0 100644 --- a/src/sort/search_test.go +++ b/src/sort/search_test.go @@ -147,7 +147,7 @@ func BenchmarkSearchWrappers(b *testing.B) { } // Abstract exhaustive test: all sizes up to 100, -// all possible return values. If there are any small +// all possible return values. If there are any small // corner cases, this test exercises them. func TestSearchExhaustive(t *testing.T) { for size := 0; size <= 100; size++ { diff --git a/src/sort/sort.go b/src/sort/sort.go index ce3dc06f88..b322c0eddf 100644 --- a/src/sort/sort.go +++ b/src/sort/sort.go @@ -7,7 +7,7 @@ package sort // A type, typically a collection, that satisfies sort.Interface can be -// sorted by the routines in this package. The methods require that the +// sorted by the routines in this package. The methods require that the // elements of the collection be enumerated by an integer index. type Interface interface { // Len is the number of elements in the collection. @@ -315,7 +315,7 @@ func StringsAreSorted(a []string) bool { return IsSorted(StringSlice(a)) } // Notes on stable sorting: // The used algorithms are simple and provable correct on all input and use -// only logarithmic additional stack space. They perform well if compared +// only logarithmic additional stack space. They perform well if compared // experimentally to other stable in-place sorting algorithms. // // Remarks on other algorithms evaluated: |