mirror of
https://github.com/golang/go
synced 2024-09-30 06:14:31 -06:00
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 <adg@golang.org>
This commit is contained in:
parent
400bb82678
commit
41713b4d2b
@ -467,11 +467,7 @@ func trimUnexportedFields(fields *ast.FieldList, what string) *ast.FieldList {
|
|||||||
unexportedField := &ast.Field{
|
unexportedField := &ast.Field{
|
||||||
Type: ast.NewIdent(""), // Hack: printer will treat this as a field with a named type.
|
Type: ast.NewIdent(""), // Hack: printer will treat this as a field with a named type.
|
||||||
Comment: &ast.CommentGroup{
|
Comment: &ast.CommentGroup{
|
||||||
List: []*ast.Comment{
|
List: []*ast.Comment{{Text: fmt.Sprintf("// Has unexported %s.\n", what)}},
|
||||||
&ast.Comment{
|
|
||||||
Text: fmt.Sprintf("// Has unexported %s.\n", what),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
return &ast.FieldList{
|
return &ast.FieldList{
|
||||||
|
Loading…
Reference in New Issue
Block a user