TP-5555 | clean up

This commit is contained in:
varnit goyal
2024-10-13 14:32:09 +05:30
parent dd3d2fca20
commit 67c413c203

View File

@@ -43,6 +43,7 @@ func (sm *SourceMapService) downloadFromS3(key string, bucket string, filePath s
if err != nil {
fmt.Printf("printing key %s and bucket %s from s3 err: %v", key, bucket, filePath)
fmt.Printf("Error downloading from S3: %v\n", err)
return err
}
//defer result.Body.Close()
dir := filepath.Dir(filePath)
@@ -58,7 +59,7 @@ func (sm *SourceMapService) downloadFromS3(key string, bucket string, filePath s
defer file.Close()
body, err := io.ReadAll(result.Body)
if err != nil {
sm.logger.Info("Couldn't read object body from %v.\n")
sm.logger.Info("Couldn't read object body")
}
_, err = file.Write(body)