summaryrefslogtreecommitdiff
path: root/src/cmd/godoc/index.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2010-07-01 14:08:14 -0700
committerRob Pike <r@golang.org>2010-07-01 14:08:14 -0700
commitb3fb215bd4973f0a8b52d49bcb90f31ca64ae781 (patch)
tree5b188afe344ef0e4cb39832efc2d76613bc2e5e2 /src/cmd/godoc/index.go
parent32de5c228f33e6bcfef081d51da8263747a6c448 (diff)
downloadgolang-b3fb215bd4973f0a8b52d49bcb90f31ca64ae781.tar.gz
strings and bytes.Split: make count of 0 mean 0, not infinite.
Use a count of -1 for infinity. Ditto for Replace. R=rsc CC=golang-dev http://codereview.appspot.com/1704044 Committer: Rob Pike <r@golang.org>
Diffstat (limited to 'src/cmd/godoc/index.go')
-rw-r--r--src/cmd/godoc/index.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/godoc/index.go b/src/cmd/godoc/index.go
index 481519c66..8745b8b0a 100644
--- a/src/cmd/godoc/index.go
+++ b/src/cmd/godoc/index.go
@@ -709,7 +709,7 @@ func isIdentifier(s string) bool {
// identifier, Lookup returns a LookupResult, and a list of alternative
// spellings, if any. If the query syntax is wrong, illegal is set.
func (x *Index) Lookup(query string) (match *LookupResult, alt *AltWords, illegal bool) {
- ss := strings.Split(query, ".", 0)
+ ss := strings.Split(query, ".", -1)
// check query syntax
for _, s := range ss {