mirror of https://github.com/golang/go.git
cmd/compile: slightly more idiomatic println code
Updates #21808. Change-Id: I0314426afcfeed17b1111040110d7f2b0e209526 Reviewed-on: https://go-review.googlesource.com/62430 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
67da597312
commit
b65cffdcd8
|
|
@ -2071,10 +2071,10 @@ func walkprint(nn *Node, init *Nodes) *Node {
|
|||
s := nn.List.Slice()
|
||||
t := make([]*Node, 0, len(s)*2)
|
||||
for i, n := range s {
|
||||
t = append(t, n)
|
||||
if i != len(s)-1 {
|
||||
if i != 0 {
|
||||
t = append(t, nodstr(" "))
|
||||
}
|
||||
t = append(t, n)
|
||||
}
|
||||
t = append(t, nodstr("\n"))
|
||||
nn.List.Set(t)
|
||||
|
|
|
|||
Loading…
Reference in New Issue