diff --git a/text_formatter.go b/text_formatter.go index ec8d473..79239cf 100644 --- a/text_formatter.go +++ b/text_formatter.go @@ -154,7 +154,7 @@ func (f *TextFormatter) needsQuoting(text string) bool { } func (f *TextFormatter) appendKeyValue(b *bytes.Buffer, key string, value interface{}) { - if b.String() != "" { + if b.Len() > 0 { b.WriteByte(' ') } b.WriteString(key)