2
0

Do not export quoteCompositeFieldIfNeeded

This commit is contained in:
Jack Christensen
2020-05-12 15:47:44 -05:00
parent eebc6975de
commit 506ea36835
+2 -2
View File
@@ -567,7 +567,7 @@ func (b *CompositeTextBuilder) AppendEncoder(field TextEncoder) {
return
}
if fieldBuf != nil {
b.buf = append(b.buf, QuoteCompositeFieldIfNeeded(string(fieldBuf))...)
b.buf = append(b.buf, quoteCompositeFieldIfNeeded(string(fieldBuf))...)
}
b.buf = append(b.buf, ',')
@@ -588,7 +588,7 @@ func quoteCompositeField(src string) string {
return `"` + quoteCompositeReplacer.Replace(src) + `"`
}
func QuoteCompositeFieldIfNeeded(src string) string {
func quoteCompositeFieldIfNeeded(src string) string {
if src == "" || src[0] == ' ' || src[len(src)-1] == ' ' || strings.ContainsAny(src, `(),"\`) {
return quoteCompositeField(src)
}