MCPcopy
hub / github.com/redis/go-redis / bytes

Method bytes

internal/proto/writer.go:202–216  ·  view source on GitHub ↗
(b []byte)

Source from the content-addressed store, hash-verified

200}
201
202func (w *Writer) bytes(b []byte) error {
203 if err := w.WriteByte(RespString); err != nil {
204 return err
205 }
206
207 if err := w.writeLen(len(b)); err != nil {
208 return err
209 }
210
211 if _, err := w.Write(b); err != nil {
212 return err
213 }
214
215 return w.crlf()
216}
217
218func (w *Writer) string(s string) error {
219 return w.bytes(util.StringToBytes(s))

Callers 5

WriteArgMethod · 0.95
stringMethod · 0.95
uintMethod · 0.95
intMethod · 0.95
floatMethod · 0.95

Calls 4

writeLenMethod · 0.95
crlfMethod · 0.95
WriteByteMethod · 0.80
WriteMethod · 0.45

Tested by

no test coverage detected