From d783faf961422b4832dcda901fae99402af4a8a4 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Wed, 5 Aug 2009 15:44:45 -0700 Subject: 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 --- src/pkg/go/doc/doc.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/pkg/go/doc/doc.go') 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; } } -- cgit v1.2.3