Merge pull request #686 from go-redis/fix/redis-nil

Mention redis.Nil
This commit is contained in:
Vladimir Mihailenco 2017-12-27 13:38:22 +02:00 committed by GitHub
commit cfed9ab470
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -677,6 +677,7 @@ func (c *cmdable) DecrBy(key string, decrement int64) *IntCmd {
return cmd return cmd
} }
// Redis `GET key` command. It returns redis.Nil error when key does not exist.
func (c *cmdable) Get(key string) *StringCmd { func (c *cmdable) Get(key string) *StringCmd {
cmd := NewStringCmd("get", key) cmd := NewStringCmd("get", key)
c.process(cmd) c.process(cmd)

View File

@ -11,7 +11,7 @@ import (
"github.com/go-redis/redis/internal/proto" "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 const Nil = internal.Nil
func init() { func init() {