Skip to content

Commit

Permalink
Document MGET for non-existend correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
pascaldekloe committed Nov 28, 2019
1 parent b4f1f0b commit 34152fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions command.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,23 +133,23 @@ func (c *Client) BytesGET(key []byte) (value []byte, err error) {
}

// MGET executes <https://redis.io/commands/mget>.
// The return is nil if key does not exist.
// For every key that does not exist, a nil value is returned.
func (c *Client) MGET(keys ...string) (values [][]byte, err error) {
r := newRequestSize(len(keys)+1, "\r\n$4\r\nMGET")
r.addStringList(keys)
return c.commandBytesArray(r)
}

// MGETString executes <https://redis.io/commands/mget>.
// The return is nil if key does not exist.
// For every key that does not exist, an empty string is returned.
func (c *Client) MGETString(keys ...string) (values []string, err error) {
r := newRequestSize(len(keys)+1, "\r\n$4\r\nMGET")
r.addStringList(keys)
return c.commandStringArray(r)
}

// BytesMGET executes <https://redis.io/commands/mget>.
// The return is nil if key does not exist.
// For every key that does not exist, a nil value is returned.
func (c *Client) BytesMGET(keys ...[]byte) (values [][]byte, err error) {
r := newRequestSize(len(keys)+1, "\r\n$4\r\nMGET")
r.addBytesList(keys)
Expand Down

0 comments on commit 34152fa

Please sign in to comment.