From: Brad Fitzpatrick Date: Thu, 9 Feb 2012 23:22:01 +0000 (+1100) Subject: regexp: name result parameters referenced from docs X-Git-Tag: weekly.2012-02-14~171 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=9cd4a0467ae2494b0734693b90d47c604610a9ac;p=gostls13.git regexp: name result parameters referenced from docs Fixes #2953 R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5653051 --- diff --git a/src/pkg/regexp/regexp.go b/src/pkg/regexp/regexp.go index d12ff02759..54c53776cf 100644 --- a/src/pkg/regexp/regexp.go +++ b/src/pkg/regexp/regexp.go @@ -676,7 +676,7 @@ func (re *Regexp) FindString(s string) string { // location of the leftmost match in s of the regular expression. The match // itself is at s[loc[0]:loc[1]]. // A return value of nil indicates no match. -func (re *Regexp) FindStringIndex(s string) []int { +func (re *Regexp) FindStringIndex(s string) (loc []int) { a := re.doExecute(nil, nil, s, 0, 2) if a == nil { return nil @@ -688,7 +688,7 @@ func (re *Regexp) FindStringIndex(s string) []int { // location of the leftmost match of the regular expression in text read from // the RuneReader. The match itself is at s[loc[0]:loc[1]]. A return // value of nil indicates no match. -func (re *Regexp) FindReaderIndex(r io.RuneReader) []int { +func (re *Regexp) FindReaderIndex(r io.RuneReader) (loc []int) { a := re.doExecute(r, nil, "", 0, 2) if a == nil { return nil