MCPcopy Create free account
hub / github.com/canopyclimate/golive / writeJSONString

Method writeJSONString

internal/tmpl/tree.go:186–198  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

184}
185
186func (cw *countWriter) writeJSONString(s string) {
187 if cw.err != nil {
188 return
189 }
190 cw.buf = cw.buf[:0]
191 var err error
192 cw.buf, err = json.AppendString(cw.buf, s)
193 if err != nil {
194 cw.err = err
195 return
196 }
197 cw.writeBytes(cw.buf)
198}
199
200func (cw *countWriter) writeLeadingComma(i int) {
201 if i == 0 {

Callers 2

writeDynamicMethod · 0.95
writeToMethod · 0.80

Calls 2

writeBytesMethod · 0.95
AppendStringFunction · 0.92

Tested by

no test coverage detected