mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 03:13:49 +08:00
Chore: Check errors from Close calls (#29562)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
@ -49,7 +49,11 @@ func (az *AzureBlobUploader) Upload(ctx context.Context, imageDiskPath string) (
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
defer file.Close()
|
||||
defer func() {
|
||||
if err := file.Close(); err != nil {
|
||||
az.log.Warn("Failed to close file", "path", imageDiskPath, "err", err)
|
||||
}
|
||||
}()
|
||||
|
||||
randomFileName, err := util.GetRandomString(30)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user