MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / encode

Method encode

pkg/util/json/encode.go:54–59  ·  view source on GitHub ↗
(appendTo []byte)

Source from the content-addressed store, hash-verified

52}
53
54func (j jsonString) encode(appendTo []byte) (e jEntry, b []byte, err error) {
55 if err := checkLength(len(j)); err != nil {
56 return jEntry{}, b, err
57 }
58 return makeStringJEntry(len(j)), append(appendTo, []byte(j)...), nil
59}
60
61func (j jsonNumber) encode(appendTo []byte) (e jEntry, b []byte, err error) {
62 decOffset := len(appendTo)

Callers

nothing calls this directly

Calls 2

checkLengthFunction · 0.85
makeStringJEntryFunction · 0.85

Tested by

no test coverage detected