MCPcopy Create free account
hub / github.com/bet365/jingo / optInstrRaw

Method optInstrRaw

structencoder.go:231–246  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

229}
230
231func (e *StructEncoder) optInstrRaw() {
232 conv := func(v unsafe.Pointer, w *Buffer) {
233 s := *(*string)(v)
234 if len(s) == 0 {
235 w.Write(null)
236 return
237 }
238 w.WriteString(s)
239 }
240
241 if e.f.Type.Kind() == reflect.Ptr {
242 e.ptrval(conv)
243 } else {
244 e.val(conv)
245 }
246}
247
248func (e *StructEncoder) optInstrEscape() {
249 if e.f.Type.Kind() == reflect.Slice {

Callers 1

NewStructEncoderFunction · 0.95

Calls 4

ptrvalMethod · 0.95
valMethod · 0.95
WriteMethod · 0.80
WriteStringMethod · 0.80

Tested by

no test coverage detected