MCPcopy Create free account
hub / github.com/brimdata/super / WriteControl

Method WriteControl

api/queryio/jsup.go:36–45  ·  view source on GitHub ↗
(v any)

Source from the content-addressed store, hash-verified

34}
35
36func (w *JSUPWriter) WriteControl(v any) error {
37 // XXX Would rather use sup.Marshal here instead of importing reflection
38 // into this package, but there's an issue with marshaling nil
39 // interfaces, which occurs frequently with jsupio.Object.Types. For now
40 // just reflect here.
41 return w.encoder.Encode(describe{
42 Type: reflect.TypeOf(v).Name(),
43 Value: v,
44 })
45}
46
47func (w *JSUPWriter) Close() error {
48 return nil

Callers 1

TestJSUPWriterFunction · 0.95

Calls 2

EncodeMethod · 0.65
TypeOfMethod · 0.65

Tested by 1

TestJSUPWriterFunction · 0.76