From c79e98c2868179ea47618b296ce28c5eebc0b99d Mon Sep 17 00:00:00 2001 From: go101 Date: Sun, 4 Nov 2018 03:48:07 -0500 Subject: [PATCH] fix ExampleCommentMap --- src/go/ast/example_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/go/ast/example_test.go b/src/go/ast/example_test.go index 52a77981b8..e3013f64be 100644 --- a/src/go/ast/example_test.go +++ b/src/go/ast/example_test.go @@ -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 } }