From: Didier Spezia Date: Sun, 23 Aug 2015 12:32:18 +0000 (+0000) Subject: cmd/doc: slice/map literals janitoring X-Git-Tag: go1.6beta1~1101 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=41713b4d2b116edcc388dd9b12c15fd67db0efea;p=gostls13.git 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 --- diff --git a/src/cmd/doc/pkg.go b/src/cmd/doc/pkg.go index 569c7a3062..daa22e459d 100644 --- a/src/cmd/doc/pkg.go +++ b/src/cmd/doc/pkg.go @@ -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{