Update vendored library github.com/Azure/azure-sdk-for-go

This commit is contained in:
Alexander Neumann 2018-03-30 11:42:11 +02:00
parent a951e7b126
commit 5a77b2ab49
3265 changed files with 861288 additions and 439102 deletions

View file

@ -110,13 +110,13 @@ func (b *Blob) StartCopy(sourceBlob string, options *CopyOptions) (string, error
if err != nil {
return "", err
}
defer readAndCloseBody(resp.body)
defer readAndCloseBody(resp.Body)
if err := checkRespCode(resp.statusCode, []int{http.StatusAccepted, http.StatusCreated}); err != nil {
if err := checkRespCode(resp, []int{http.StatusAccepted, http.StatusCreated}); err != nil {
return "", err
}
copyID := resp.headers.Get("x-ms-copy-id")
copyID := resp.Header.Get("x-ms-copy-id")
if copyID == "" {
return "", errors.New("Got empty copy id header")
}
@ -152,8 +152,8 @@ func (b *Blob) AbortCopy(copyID string, options *AbortCopyOptions) error {
if err != nil {
return err
}
readAndCloseBody(resp.body)
return checkRespCode(resp.statusCode, []int{http.StatusNoContent})
defer readAndCloseBody(resp.Body)
return checkRespCode(resp, []int{http.StatusNoContent})
}
// WaitForCopy loops until a BlobCopy operation is completed (or fails with error)
@ -223,13 +223,13 @@ func (b *Blob) IncrementalCopyBlob(sourceBlobURL string, snapshotTime time.Time,
if err != nil {
return "", err
}
defer readAndCloseBody(resp.body)
defer readAndCloseBody(resp.Body)
if err := checkRespCode(resp.statusCode, []int{http.StatusAccepted}); err != nil {
if err := checkRespCode(resp, []int{http.StatusAccepted}); err != nil {
return "", err
}
copyID := resp.headers.Get("x-ms-copy-id")
copyID := resp.Header.Get("x-ms-copy-id")
if copyID == "" {
return "", errors.New("Got empty copy id header")
}