Fix Repr of empty list.

This commit is contained in:
Qi Xiao 2016-02-18 19:42:06 +01:00
parent cc412f8684
commit c2a3e78d5f

View File

@ -212,7 +212,7 @@ func (b *ListReprBuilder) WriteElem(v string) {
func (b *ListReprBuilder) String() string {
if b.buf.Len() == 0 {
return "["
return "[]"
}
b.buf.WriteByte(']')
return b.buf.String()