diff --git a/container/gset/gset_str_set.go b/container/gset/gset_str_set.go index 956f27af3..b364534ef 100644 --- a/container/gset/gset_str_set.go +++ b/container/gset/gset_str_set.go @@ -228,6 +228,7 @@ func (set *StrSet) String() string { i = 0 buffer = bytes.NewBuffer(nil) ) + buffer.WriteByte('[') for k, _ := range set.data { buffer.WriteString(`"` + gstr.QuoteMeta(k, `"\`) + `"`) if i != l-1 { @@ -235,6 +236,7 @@ func (set *StrSet) String() string { } i++ } + buffer.WriteByte(']') return buffer.String() }