diff --git a/commands.go b/commands.go index aa98aa73..569342cf 100644 --- a/commands.go +++ b/commands.go @@ -677,6 +677,7 @@ func (c *cmdable) DecrBy(key string, decrement int64) *IntCmd { return cmd } +// Redis `GET key` command. It returns redis.Nil error when key does not exist. func (c *cmdable) Get(key string) *StringCmd { cmd := NewStringCmd("get", key) c.process(cmd) diff --git a/redis.go b/redis.go index 230091b3..37ffafd9 100644 --- a/redis.go +++ b/redis.go @@ -11,7 +11,7 @@ import ( "github.com/go-redis/redis/internal/proto" ) -// Redis nil reply, .e.g. when key does not exist. +// Redis nil reply returned when key does not exist. const Nil = internal.Nil func init() {