MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / encodeRESPArray

Function encodeRESPArray

internal/home/certificate.go:335–348  ·  view source on GitHub ↗
(args ...string)

Source from the content-addressed store, hash-verified

333}
334
335func encodeRESPArray(args ...string) []byte {
336 var buf bytes.Buffer
337 buf.WriteString("*")
338 buf.WriteString(strconv.Itoa(len(args)))
339 buf.WriteString("\r\n")
340 for _, arg := range args {
341 buf.WriteString("$")
342 buf.WriteString(strconv.Itoa(len(arg)))
343 buf.WriteString("\r\n")
344 buf.WriteString(arg)
345 buf.WriteString("\r\n")
346 }
347 return buf.Bytes()
348}
349
350func readRESPBulk(reader *bufio.Reader) ([]byte, error) {
351 prefix, errRead := reader.ReadByte()

Callers 1

requestClientCertificateFunction · 0.85

Calls 2

WriteStringMethod · 0.80
BytesMethod · 0.80

Tested by

no test coverage detected