appendString appends a string value to the buffer. If the string does not require escaping, it is appended directly. Otherwise, it is escaped and quoted.
(data string)
| 59 | // If the string does not require escaping, it is appended directly. |
| 60 | // Otherwise, it is escaped and quoted. |
| 61 | func (b *buffer) appendString(data string) { |
| 62 | if b.isStringQuoteSafe(data) { |
| 63 | b.appendStringRaw(data) |
| 64 | } else { |
| 65 | b.appendStringQuoted(data) |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | // appendStringRaw appends a string value to the buffer without escaping. |
| 70 | func (b *buffer) appendStringRaw(data string) { |
no test coverage detected