|
|
- package redis
-
- import (
- redisdb "github.com/gomodule/redigo/redis"
- )
-
- //exists
- func Exists(key string) (bool, error) {
- c := pool.Get()
- defer c.Close()
-
- return redisdb.Bool(c.Do("EXISTS", key))
-
- }
-
- //hexists
- func HExists(key string) (bool, error) {
- c := pool.Get()
- defer c.Close()
-
- return redisdb.Bool(c.Do("HEXISTS", key))
-
- }
|