fix sonar Part3

This commit is contained in:
Ming Deng
2021-02-03 19:42:42 +08:00
parent 6f98a01bfd
commit 62aa0188c4
18 changed files with 513 additions and 977 deletions

View File

@@ -84,7 +84,7 @@ func (rc *Cache) GetMulti(ctx context.Context, keys []string) ([]interface{}, er
keysErr := make([]string, 0)
for i, ki := range keys {
if _, ok := mv[ki]; !ok {
keysErr = append(keysErr, fmt.Sprintf("key [%s] error: %s", ki, "the key isn't exist"))
keysErr = append(keysErr, fmt.Sprintf("key [%s] error: %s", ki, "key not exist"))
continue
}
rv[i] = mv[ki].Value