MCPcopy Index your code
hub / github.com/keploy/keploy / WriteLengthEncodedString

Function WriteLengthEncodedString

pkg/agent/proxy/integrations/mysql/utils/util.go:319–328  ·  view source on GitHub ↗
(buf *bytes.Buffer, s string)

Source from the content-addressed store, hash-verified

317}
318
319func WriteLengthEncodedString(buf *bytes.Buffer, s string) error {
320 length := len(s)
321 if err := WriteLengthEncodedInteger(buf, uint64(length)); err != nil {
322 return err
323 }
324 if _, err := buf.WriteString(s); err != nil {
325 return err
326 }
327 return nil
328}
329
330func WriteLengthEncodedInteger(buf *bytes.Buffer, num uint64) error {
331 switch {

Callers 4

EncodeColumnFunction · 0.92
EncodeBinaryRowFunction · 0.92
EncodeTextRowFunction · 0.92

Calls 1

Tested by

no test coverage detected