fix ExampleCommentMap

This commit is contained in:
go101 2018-11-04 03:48:07 -05:00
parent bb222cde10
commit c79e98c286
1 changed files with 2 additions and 1 deletions

View File

@ -151,7 +151,7 @@ package main
const hello = "Hello, World!" // line comment 1
// This comment is associated with the foo variable.
var foo = hello // line comment 2
var foo = hello // line comment 2
// This comment is associated with the main function.
func main() {
@ -176,6 +176,7 @@ func main() {
if gen, ok := decl.(*ast.GenDecl); ok && gen.Tok == token.VAR {
copy(f.Decls[i:], f.Decls[i+1:])
f.Decls = f.Decls[:len(f.Decls)-1]
break
}
}