aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2010-03-18 14:09:17 -0700
committerRobert Griesemer <gri@golang.org>2010-03-18 14:09:17 -0700
commit7f7751837c2072ed14812b75e39e355b03ef2eac (patch)
tree1bb430bf8e420a8be3a193bfe07dee11d75a8967
parent8c24fa95aa5dbf2123d639cf7977a1b56d8abdb8 (diff)
downloadgo-7f7751837c2072ed14812b75e39e355b03ef2eac.tar.gz
go-7f7751837c2072ed14812b75e39e355b03ef2eac.zip
go/doc cleanup: remove some unnecessary string conversions
R=rsc CC=golang-dev https://golang.org/cl/642041
-rw-r--r--src/pkg/go/doc/doc.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/pkg/go/doc/doc.go b/src/pkg/go/doc/doc.go
index 5479743bae..5ff3eafa6d 100644
--- a/src/pkg/go/doc/doc.go
+++ b/src/pkg/go/doc/doc.go
@@ -292,10 +292,9 @@ func (doc *docReader) addFile(src *ast.File) {
// collect BUG(...) comments
for _, c := range src.Comments {
text := c.List[0].Text
- cstr := string(text)
- if m := bug_markers.ExecuteString(cstr); len(m) > 0 {
+ if m := bug_markers.Execute(text); len(m) > 0 {
// found a BUG comment; maybe empty
- if bstr := cstr[m[1]:]; bug_content.MatchString(bstr) {
+ if btxt := text[m[1]:]; bug_content.Match(btxt) {
// non-empty BUG comment; collect comment without BUG prefix
list := copyCommentList(c.List)
list[0].Text = text[m[1]:]