Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
7f775183
Commit
7f775183
authored
Mar 18, 2010
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go/doc cleanup: remove some unnecessary string conversions
R=rsc CC=golang-dev
https://golang.org/cl/642041
parent
8c24fa95
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
doc.go
src/pkg/go/doc/doc.go
+2
-3
No files found.
src/pkg/go/doc/doc.go
View file @
7f775183
...
...
@@ -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
b
str
:=
cstr
[
m
[
1
]
:
];
bug_content
.
MatchString
(
bstr
)
{
if
b
txt
:=
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
]
:
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment