Refine minio kv FGetObject function (#12078)

Signed-off-by: Edward Zeng <jie.zeng@zilliz.com>
This commit is contained in:
edward.zeng 2021-11-21 22:53:13 +08:00 committed by GitHub
parent d4c297b1a8
commit 3cfc740a05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -137,13 +137,9 @@ func (kv *MinIOKV) Load(key string) (string, error) {
return buf.String(), nil
}
// FGetObject download file from minio to local storage system.
// FGetObject downloads file from minio to local storage system.
func (kv *MinIOKV) FGetObject(key, localPath string) error {
err := kv.minioClient.FGetObject(kv.ctx, kv.bucketName, key, localPath+key, minio.GetObjectOptions{})
if err != nil {
return err
}
return nil
return kv.minioClient.FGetObject(kv.ctx, kv.bucketName, key, localPath+key, minio.GetObjectOptions{})
}
// FGetObjects download file from minio to local storage system.