MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / appendString

Method appendString

logger/buffer.go:61–67  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

59// If the string does not require escaping, it is appended directly.
60// Otherwise, it is escaped and quoted.
61func (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.
70func (b *buffer) appendStringRaw(data string) {

Callers 3

formatMethod · 0.45
appendKeyMethod · 0.45
appendKeyMethod · 0.45

Calls 3

isStringQuoteSafeMethod · 0.95
appendStringRawMethod · 0.95
appendStringQuotedMethod · 0.95

Tested by

no test coverage detected