This commit is contained in:
suyl
2021-07-19 18:54:42 +08:00
parent 6ca85d5be2
commit f765774128
2 changed files with 4 additions and 7 deletions

View File

@@ -34,13 +34,10 @@ func DelKey(key string) error {
return client.Del(key).Err()
}
func GetKet(key string) interface{} {
func GetKey(key string) string {
result, err := client.Get(key).Result()
if err == nil {
var retVal interface{}
if err = utils.UnmarshalUseNumber([]byte(result), &retVal); err == nil {
return retVal
}
return result
}
return nil
return ""
}