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

Method flunk

structencoder.go:279–290  ·  view source on GitHub ↗

flunk flushes whatever chunk data we've got buffered into a single instruction

()

Source from the content-addressed store, hash-verified

277
278// flunk flushes whatever chunk data we've got buffered into a single instruction
279func (e *StructEncoder) flunk() {
280
281 b := e.cb.Bytes
282 bs := b[e.cpos:]
283 e.cpos = len(b)
284
285 if len(bs) == 0 {
286 return
287 }
288
289 e.instructions = append(e.instructions, instruction{static: bs, kind: kindStatic})
290}
291
292// valueInst works out the conversion function we need for `k` and creates an instruction to write it to the buffer
293func (e *StructEncoder) valueInst(k reflect.Kind, instr func(func(unsafe.Pointer, *Buffer))) {

Callers 6

NewStructEncoderFunction · 0.95
optInstrEscapeMethod · 0.95
valueInstMethod · 0.95
valMethod · 0.95
ptrvalMethod · 0.95
ptrstringvalMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected