fix utils
This commit is contained in:
1 parent
1429c7fd85
commit
0a471443ce
8 files changed
+174
-26
No files matched your search
@@ -55,13 +55,9 @@ func RedisGet(namespace, key string) (string, error) {
|
||||
return "", errors.New("key empty")
|
||||
}
|
||||
|
||||
if len(n) > 0 {
|
||||
n += ":"
|
||||
}
|
||||
|
||||
n += key
|
||||
|
||||
val, err := redisStore.Get(key).Result()
|
||||
val, err := redisStore.Get(n).Result()
|
||||
return val, err
|
||||
}
|
||||
|
||||
@@ -77,10 +73,6 @@ func RedisDel(namespace, key string) error {
|
||||
return errors.New("key empty")
|
||||
}
|
||||
|
||||
if len(n) > 0 {
|
||||
n += ":"
|
||||
}
|
||||
|
||||
n += key
|
||||
|
||||
err := redisStore.Del(n).Err()
|
||||
|
||||
Reference in new issue
Block a user