Skip to content

Commit

Permalink
variant: don't output unneeded space when formatting structs
Browse files Browse the repository at this point in the history
  • Loading branch information
guelfey committed Nov 9, 2024
1 parent 5d47bee commit 0353a2a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion variant.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ func (v Variant) format() (string, bool) {
s, b := MakeVariant(rv.Field(i).Interface()).format()
unamb = unamb && b
buf.WriteString(s)
buf.WriteString(", ")
buf.WriteString(",")
if i != rv.NumField()-1 {
buf.WriteString(" ")
}
}
buf.WriteByte(')')
return buf.String(), unamb
Expand Down

0 comments on commit 0353a2a

Please sign in to comment.