summaryrefslogtreecommitdiff
path: root/src/pkg/go/doc/doc.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-11-20 11:45:05 -0800
committerRuss Cox <rsc@golang.org>2009-11-20 11:45:05 -0800
commitc861f30835090bbd6b9b35a80667f26952843767 (patch)
tree645bd57ef3c9326ec02e646a751b9075d12a79e7 /src/pkg/go/doc/doc.go
parent7089e97992d5d6be520dfea787200061992526c8 (diff)
downloadgolang-c861f30835090bbd6b9b35a80667f26952843767.tar.gz
gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkg
R=r, gri CC=golang-dev http://codereview.appspot.com/156115
Diffstat (limited to 'src/pkg/go/doc/doc.go')
-rw-r--r--src/pkg/go/doc/doc.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/go/doc/doc.go b/src/pkg/go/doc/doc.go
index 4ef12641b..c713ffc45 100644
--- a/src/pkg/go/doc/doc.go
+++ b/src/pkg/go/doc/doc.go
@@ -277,10 +277,10 @@ func (doc *docReader) addFile(src *ast.File) {
cstr := string(text);
if m := bug_markers.ExecuteString(cstr); len(m) > 0 {
// found a BUG comment; maybe empty
- if bstr := cstr[m[1]:len(cstr)]; bug_content.MatchString(bstr) {
+ if bstr := cstr[m[1]:]; 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)];
+ list[0].Text = text[m[1]:];
doc.bugs.Push(&ast.CommentGroup{list, nil});
}
}