github.com/johnnyeven/libtools@v0.0.0-20191126065708-61829c1adf46/redis/reply.go (about) 1 package redis 2 3 import ( 4 "github.com/gomodule/redigo/redis" 5 ) 6 7 func (cache *RedisCache) HGetString(key, field string) (string, error) { 8 conn := cache.Pool.Get() 9 defer conn.Close() 10 return redis.String(RedisDo(conn)("HGET", key, field)) 11 } 12 13 func (cache *RedisCache) HGetUint64(key, field string) (uint64, error) { 14 conn := cache.Pool.Get() 15 defer conn.Close() 16 return redis.Uint64(RedisDo(conn)("HGET", key, field)) 17 } 18 19 func (cache *RedisCache) HGetInt64(key, field string) (int64, error) { 20 conn := cache.Pool.Get() 21 defer conn.Close() 22 return redis.Int64(RedisDo(conn)("HGET", key, field)) 23 }