src/pkg/go/printer/printer.go | 3 +++ diff --git a/src/pkg/go/printer/printer.go b/src/pkg/go/printer/printer.go index 3bb51b466f6c50f8b3326ab89d34acdfeda109ff..4c530d2490a1cf78a602ac08d2da6a31a23e5cb4 100644 --- a/src/pkg/go/printer/printer.go +++ b/src/pkg/go/printer/printer.go @@ -1018,6 +1018,9 @@ p.stmt(n, ignoreMultiLine) case ast.Decl: p.useNodeComments = true p.decl(n, atTop, ignoreMultiLine) + case ast.Spec: + p.useNodeComments = true + p.spec(n, 1, atTop, false, ignoreMultiLine) case *ast.File: p.comments = n.Comments p.useNodeComments = n.Comments == nil