MCPcopy
hub / github.com/valyala/quicktemplate / Q

Method Q

writer.go:164–172  ·  view source on GitHub ↗

Q writes quoted json-safe s to w.

(s string)

Source from the content-addressed store, hash-verified

162
163// Q writes quoted json-safe s to w.
164func (w *QWriter) Q(s string) {
165 bb, ok := w.w.(*ByteBuffer)
166 if ok {
167 bb.B = AppendJSONString(bb.B, s, true)
168 } else {
169 w.b = AppendJSONString(w.b[:0], s, true)
170 w.Write(w.b)
171 }
172}
173
174var strQuote = []byte(`"`)
175

Callers 7

benchmarkQWriterQFunction · 0.95
QZMethod · 0.95
TestWriterFunction · 0.80
TestQWriterQFunction · 0.80
StreamIntegrationFunction · 0.80
StreamBodyMethod · 0.80
StreamJSONMethod · 0.80

Calls 2

WriteMethod · 0.95
AppendJSONStringFunction · 0.85

Tested by 3

benchmarkQWriterQFunction · 0.76
TestWriterFunction · 0.64
TestQWriterQFunction · 0.64