Fix function signatures using sensible defaults

This commit is contained in:
Matt Ouille
2024-02-18 18:32:10 -08:00
parent 5a22b69d3f
commit 7ab42915f4
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -129,7 +129,7 @@ func (s *azblobLock) acquireLease(ctx context.Context, blobURL azblob.BlockBlobU
defer cancel() defer cancel()
// first we need to create a blob which can be then leased // first we need to create a blob which can be then leased
_, err := blobURL.Upload(tctx, bytes.NewReader([]byte{1}), azblob.BlobHTTPHeaders{}, nil, azblob.BlobAccessConditions{}) _, err := blobURL.Upload(tctx, bytes.NewReader([]byte{1}), azblob.BlobHTTPHeaders{}, nil, azblob.BlobAccessConditions{}, azblob.DefaultAccessTier, nil, azblob.ClientProvidedKeyOptions{}, azblob.ImmutabilityPolicyOptions{})
if err != nil { if err != nil {
// if the blob is already leased we will get http.StatusPreconditionFailed while writing to that blob // if the blob is already leased we will get http.StatusPreconditionFailed while writing to that blob
var stgErr azblob.StorageError var stgErr azblob.StorageError
+2 -2
View File
@@ -62,7 +62,7 @@ func (c *azureBlobStoreClient) BlobExists(ctx context.Context, path string) (boo
const op errors.Op = "azureblob.BlobExists" const op errors.Op = "azureblob.BlobExists"
// TODO: Any better way of doing this ? // TODO: Any better way of doing this ?
blobURL := c.containerURL.NewBlockBlobURL(path) blobURL := c.containerURL.NewBlockBlobURL(path)
_, err := blobURL.GetProperties(ctx, azblob.BlobAccessConditions{}) _, err := blobURL.GetProperties(ctx, azblob.BlobAccessConditions{}, azblob.ClientProvidedKeyOptions{})
if err != nil { if err != nil {
var serr azblob.StorageError var serr azblob.StorageError
if !errors.AsErr(err, &serr) { if !errors.AsErr(err, &serr) {
@@ -81,7 +81,7 @@ func (c *azureBlobStoreClient) BlobExists(ctx context.Context, path string) (boo
func (c *azureBlobStoreClient) ReadBlob(ctx context.Context, path string) (storage.SizeReadCloser, error) { func (c *azureBlobStoreClient) ReadBlob(ctx context.Context, path string) (storage.SizeReadCloser, error) {
const op errors.Op = "azureblob.ReadBlob" const op errors.Op = "azureblob.ReadBlob"
blobURL := c.containerURL.NewBlockBlobURL(path) blobURL := c.containerURL.NewBlockBlobURL(path)
downloadResponse, err := blobURL.Download(ctx, 0, 0, azblob.BlobAccessConditions{}, false) downloadResponse, err := blobURL.Download(ctx, 0, 0, azblob.BlobAccessConditions{}, false, azblob.ClientProvidedKeyOptions{})
if err != nil { if err != nil {
return nil, errors.E(op, err) return nil, errors.E(op, err)
} }