MCPcopy Create free account
hub / github.com/distributedio/titan / BulkString

Method BulkString

encoding/resp/resp.go:96–100  ·  view source on GitHub ↗

BulkString builds a RESP bulkstring

(s string)

Source from the content-addressed store, hash-verified

94
95//BulkString builds a RESP bulkstring
96func (r *Encoder) BulkString(s string) error {
97 length := strconv.Itoa(len(s))
98 _, err := r.w.Write([]byte("$" + length + "\r\n" + s + "\r\n"))
99 return err
100}
101
102// NullBulkString builds a RESP null bulkstring
103func (r *Encoder) NullBulkString() error {

Callers 1

TestBulkString_EncodeFunction · 0.95

Implementers 1

Encoderencoding/resp/resp.go

Calls 1

WriteMethod · 0.80

Tested by 1

TestBulkString_EncodeFunction · 0.76