diff options
| author | Rob Pike <r@golang.org> | 2009-08-05 15:44:45 -0700 |
|---|---|---|
| committer | Rob Pike <r@golang.org> | 2009-08-05 15:44:45 -0700 |
| commit | d783faf961422b4832dcda901fae99402af4a8a4 (patch) | |
| tree | 429b7272abf335514fe8208c1e48fff251723a54 /src/pkg/go/doc/doc.go | |
| parent | 79475d55878ee129a94cd669a43c0c0df84969df (diff) | |
| download | golang-d783faf961422b4832dcda901fae99402af4a8a4.tar.gz | |
support []byte (more efficient) as well as string in the interfaces.
change the names; Match is for []byte and MatchString is for string, etc.
R=rsc
DELTA=195 (155 added, 0 deleted, 40 changed)
OCL=32800
CL=32800
Diffstat (limited to 'src/pkg/go/doc/doc.go')
| -rw-r--r-- | src/pkg/go/doc/doc.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pkg/go/doc/doc.go b/src/pkg/go/doc/doc.go index 634bd0ce9..2edc84638 100644 --- a/src/pkg/go/doc/doc.go +++ b/src/pkg/go/doc/doc.go @@ -223,9 +223,9 @@ func (doc *docReader) addFile(src *ast.File) { for c := src.Comments; c != nil; c = c.Next { text := c.List[0].Text; cstr := string(text); - if m := bug_markers.Execute(cstr); len(m) > 0 { + if m := bug_markers.ExecuteString(cstr); len(m) > 0 { // found a BUG comment; maybe empty - if bstr := cstr[m[1] : len(cstr)]; bug_content.Match(bstr) { + if bstr := cstr[m[1] : len(cstr)]; bug_content.MatchString(bstr) { // non-empty BUG comment; collect comment without BUG prefix list := copyCommentList(c.List); list[0].Text = text[m[1] : len(text)]; @@ -486,7 +486,7 @@ func isRegexp(s string) bool { func match(s string, a []string) bool { for _, t := range a { if isRegexp(t) { - if matched, err := regexp.Match(t, s); matched { + if matched, err := regexp.MatchString(t, s); matched { return true; } } |
