]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/doc: slice/map literals janitoring
authorDidier Spezia <didier.06@gmail.com>
Sun, 23 Aug 2015 12:32:18 +0000 (12:32 +0000)
committerIan Lance Taylor <iant@golang.org>
Fri, 11 Sep 2015 14:04:46 +0000 (14:04 +0000)
Simplify slice/map literal expression.
Caught with gofmt -d -s

Change-Id: I7f38ef9fb528e2fd284bd0f190fbdf4a91956e55
Reviewed-on: https://go-review.googlesource.com/13834
Reviewed-by: Andrew Gerrand <adg@golang.org>
src/cmd/doc/pkg.go

index 569c7a30624903653373d9789d26be8e5d393ccc..daa22e459dcefdfbf81a202041257d2ee41465cc 100644 (file)
@@ -467,11 +467,7 @@ func trimUnexportedFields(fields *ast.FieldList, what string) *ast.FieldList {
        unexportedField := &ast.Field{
                Type: ast.NewIdent(""), // Hack: printer will treat this as a field with a named type.
                Comment: &ast.CommentGroup{
-                       List: []*ast.Comment{
-                               &ast.Comment{
-                                       Text: fmt.Sprintf("// Has unexported %s.\n", what),
-                               },
-                       },
+                       List: []*ast.Comment{{Text: fmt.Sprintf("// Has unexported %s.\n", what)}},
                },
        }
        return &ast.FieldList{