mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
fix multiple return values on azblob.NewSharedKeyCredential
This commit is contained in:
parent
290d026a47
commit
d139cb17ff
1 changed files with 15 additions and 3 deletions
|
|
@ -45,7 +45,11 @@ func AzureBlobstoreUpload(path string, name string, config AzureBlobstoreConfig)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
// Create an authenticated client against the Azure cloud
|
// Create an authenticated client against the Azure cloud
|
||||||
credential := azblob.NewSharedKeyCredential(config.Account, config.Token)
|
credential, err := azblob.NewSharedKeyCredential(config.Account, config.Token)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
pipeline := azblob.NewPipeline(credential, azblob.PipelineOptions{})
|
pipeline := azblob.NewPipeline(credential, azblob.PipelineOptions{})
|
||||||
|
|
||||||
u, _ := url.Parse(fmt.Sprintf("https://%s.blob.core.windows.net", config.Account))
|
u, _ := url.Parse(fmt.Sprintf("https://%s.blob.core.windows.net", config.Account))
|
||||||
|
|
@ -67,7 +71,11 @@ func AzureBlobstoreUpload(path string, name string, config AzureBlobstoreConfig)
|
||||||
|
|
||||||
// AzureBlobstoreList lists all the files contained within an azure blobstore.
|
// AzureBlobstoreList lists all the files contained within an azure blobstore.
|
||||||
func AzureBlobstoreList(config AzureBlobstoreConfig) ([]azblob.BlobItem, error) {
|
func AzureBlobstoreList(config AzureBlobstoreConfig) ([]azblob.BlobItem, error) {
|
||||||
credential := azblob.NewSharedKeyCredential(config.Account, config.Token)
|
credential, err := azblob.NewSharedKeyCredential(config.Account, config.Token)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
pipeline := azblob.NewPipeline(credential, azblob.PipelineOptions{})
|
pipeline := azblob.NewPipeline(credential, azblob.PipelineOptions{})
|
||||||
|
|
||||||
u, _ := url.Parse(fmt.Sprintf("https://%s.blob.core.windows.net", config.Account))
|
u, _ := url.Parse(fmt.Sprintf("https://%s.blob.core.windows.net", config.Account))
|
||||||
|
|
@ -95,7 +103,11 @@ func AzureBlobstoreDelete(config AzureBlobstoreConfig, blobs []azblob.BlobItem)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
// Create an authenticated client against the Azure cloud
|
// Create an authenticated client against the Azure cloud
|
||||||
credential := azblob.NewSharedKeyCredential(config.Account, config.Token)
|
credential, err := azblob.NewSharedKeyCredential(config.Account, config.Token)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
pipeline := azblob.NewPipeline(credential, azblob.PipelineOptions{})
|
pipeline := azblob.NewPipeline(credential, azblob.PipelineOptions{})
|
||||||
|
|
||||||
u, _ := url.Parse(fmt.Sprintf("https://%s.blob.core.windows.net", config.Account))
|
u, _ := url.Parse(fmt.Sprintf("https://%s.blob.core.windows.net", config.Account))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue