]> Cypherpunks repositories - gostls13.git/commitdiff
go/ast: fix printing of maps
authorRobert Griesemer <gri@golang.org>
Fri, 11 Mar 2011 00:00:39 +0000 (16:00 -0800)
committerRobert Griesemer <gri@golang.org>
Fri, 11 Mar 2011 00:00:39 +0000 (16:00 -0800)
Print a newline after each map entry;
similar to the style used for slices
and structs.

R=r, r2
CC=golang-dev
https://golang.org/cl/4274042

src/pkg/go/ast/print.go

index e8194e7fa3a1418e498c40efc7907d6c620a20ab..82c334ece67504ac4d21523db72c9439a4c71173 100644 (file)
@@ -158,6 +158,7 @@ func (p *printer) print(x reflect.Value) {
                        p.print(key)
                        p.printf(": ")
                        p.print(v.Elem(key))
+                       p.printf("\n")
                }
                p.indent--
                p.printf("}")