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

Function IsNilReply

internal/proto/reader.go:791–795  ·  view source on GitHub ↗

IsNilReply detects redis.Nil of RESP2.

(line []byte)

Source from the content-addressed store, hash-verified

789
790// IsNilReply detects redis.Nil of RESP2.
791func IsNilReply(line []byte) bool {
792 return len(line) == 3 &&
793 (line[0] == RespString || line[0] == RespArray) &&
794 line[1] == '-' && line[2] == '1'
795}
796
797// ReadRawReply reads the next RESP reply and returns it as raw bytes without parsing.
798func (r *Reader) ReadRawReply() ([]byte, error) {

Callers 1

ReadLineMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected