1
0
mirror of https://github.com/golang/go synced 2024-11-17 08:24:43 -07:00

cmd/compile: fix LocResults formatting

When a LocResults is an empty list, it currently prints as ">".
Make it print "<>".

Change-Id: I0f596791b471d74cd4bbc0059e269708c80592dd
Reviewed-on: https://go-review.googlesource.com/c/go/+/350144
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
Cherry Mui 2021-09-13 16:23:28 -04:00
parent b1bedc0774
commit 48e2b1ea91

View File

@ -91,8 +91,8 @@ func (t LocPair) String() string {
type LocResults []Location
func (t LocResults) String() string {
s := "<"
a := ""
s := ""
a := "<"
for _, r := range t {
a += s
s = ","