Update Azure Go SDK to v19.0.0
This commit is contained in:
8
vendor/github.com/Azure/azure-sdk-for-go/storage/file.go
generated
vendored
8
vendor/github.com/Azure/azure-sdk-for-go/storage/file.go
generated
vendored
@@ -187,7 +187,7 @@ func (f *File) Delete(options *FileRequestOptions) error {
|
||||
func (f *File) DeleteIfExists(options *FileRequestOptions) (bool, error) {
|
||||
resp, err := f.fsc.deleteResourceNoClose(f.buildPath(), resourceFile, options)
|
||||
if resp != nil {
|
||||
defer readAndCloseBody(resp.Body)
|
||||
defer drainRespBody(resp)
|
||||
if resp.StatusCode == http.StatusAccepted || resp.StatusCode == http.StatusNotFound {
|
||||
return resp.StatusCode == http.StatusAccepted, nil
|
||||
}
|
||||
@@ -212,7 +212,7 @@ func (f *File) DownloadToStream(options *FileRequestOptions) (io.ReadCloser, err
|
||||
}
|
||||
|
||||
if err = checkRespCode(resp, []int{http.StatusOK}); err != nil {
|
||||
readAndCloseBody(resp.Body)
|
||||
drainRespBody(resp)
|
||||
return nil, err
|
||||
}
|
||||
return resp.Body, nil
|
||||
@@ -242,7 +242,7 @@ func (f *File) DownloadRangeToStream(fileRange FileRange, options *GetFileOption
|
||||
}
|
||||
|
||||
if err = checkRespCode(resp, []int{http.StatusOK, http.StatusPartialContent}); err != nil {
|
||||
readAndCloseBody(resp.Body)
|
||||
drainRespBody(resp)
|
||||
return fs, err
|
||||
}
|
||||
|
||||
@@ -375,7 +375,7 @@ func (f *File) modifyRange(bytes io.Reader, fileRange FileRange, timeout *uint,
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer readAndCloseBody(resp.Body)
|
||||
defer drainRespBody(resp)
|
||||
return resp.Header, checkRespCode(resp, []int{http.StatusCreated})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user