package redis import ( redisdb "github.com/gomodule/redigo/redis") //exists func Exist(key string) (bool, error) { c := GetConn() defer c.Close() return redisdb.Bool(c.Do("EXISTS", key)) }