Skip to content

Commit 41713b4

Browse files
dspeziaianlancetaylor
authored andcommitted
cmd/doc: slice/map literals janitoring
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 <[email protected]>
1 parent 400bb82 commit 41713b4

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/cmd/doc/pkg.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -467,11 +467,7 @@ func trimUnexportedFields(fields *ast.FieldList, what string) *ast.FieldList {
467467
unexportedField := &ast.Field{
468468
Type: ast.NewIdent(""), // Hack: printer will treat this as a field with a named type.
469469
Comment: &ast.CommentGroup{
470-
List: []*ast.Comment{
471-
&ast.Comment{
472-
Text: fmt.Sprintf("// Has unexported %s.\n", what),
473-
},
474-
},
470+
List: []*ast.Comment{{Text: fmt.Sprintf("// Has unexported %s.\n", what)}},
475471
},
476472
}
477473
return &ast.FieldList{

0 commit comments

Comments
 (0)