Use fmt.Errorf instead of str concat in func.go (#16315)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/16325/head
congqixia 2022-03-31 15:03:28 +08:00 committed by GitHub
parent 56c0ea9b1d
commit f529f8c1fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -172,7 +172,7 @@ func GetAttrByKeyFromRepeatedKV(key string, kvs []*commonpb.KeyValuePair) (strin
}
}
return "", errors.New("key " + key + " not found")
return "", fmt.Errorf("key %s not found", key)
}
// CheckCtxValid check if the context is valid