fix bug
diff --git a/bundle.go b/bundle.go
index acad9b1..b2206ea 100644
--- a/bundle.go
+++ b/bundle.go
@@ -57,11 +57,11 @@
}
type blobServerResponse struct {
- id string `json:"id"`
- kind string `json:"kind"`
- self string `json:"self"`
- signedUrl string `json:"signedurl"`
- signedUrlExpiryTimestamp string `json:"signedurlexpirytimestamp"`
+ Id string `json:"id"`
+ Kind string `json:"kind"`
+ Self string `json:"self"`
+ SignedUrl string `json:"signedurl"`
+ SignedUrlExpiryTimestamp string `json:"signedurlexpirytimestamp"`
}
func (bm *bundleManager) initializeBundleDownloading() {
@@ -229,6 +229,7 @@
log.Errorf("Unable to get signed URL from BlobServer %s: %v", uri, err)
return "", err
}
+ defer surl.Close()
body, err := ioutil.ReadAll(surl)
if err != nil {
@@ -242,7 +243,7 @@
return "", err
}
- return string(res.signedUrl), nil
+ return res.SignedUrl, nil
}
// downloadFromURI involves retrieving the signed URL for the blob, and storing the resource locally