When replacing the "DO NOT EDIT" comments, the function removeDoNotEdit allocates one less character, thus slicing one of forward slashes off of the comment.
See lines 297-300 in symbols.go:
data := make([]byte, comment.End()-comment.Pos())
start := int(comment.Pos())
end := start + len(data)
data = content[start:end]
Instead, line 298 should be:
start := int(comment.Pos()) - 1
To reproduce, I tried obfuscating github.com/miekg/dns. There are some other issues there with parsing annotation tags in switch statements, but that should probably be its own separate issue.
This looks like the same problem experienced in #30
When replacing the "DO NOT EDIT" comments, the function
removeDoNotEdit
allocates one less character, thus slicing one of forward slashes off of the comment.See lines 297-300 in symbols.go:
Instead, line 298 should be:
To reproduce, I tried obfuscating github.com/miekg/dns. There are some other issues there with parsing annotation tags in switch statements, but that should probably be its own separate issue.
This looks like the same problem experienced in #30