Skip to content

Commit

Permalink
fixup! deps: fix AWS SDK upgrade breakage
Browse files Browse the repository at this point in the history
  • Loading branch information
burgerdev committed Jan 9, 2024
1 parent 725d8c3 commit a4fa6a1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions internal/api/attestationconfigapi/cli/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ func deleteAzure(ctx context.Context, client *attestationconfigapi.Client, cfg d
return client.DeleteSEVSNPVersion(ctx, variant.AzureSEVSNP{}, cfg.version)
}

func ptr[A any](a A) *A { return &a }

func deleteRecursive(ctx context.Context, path string, client *staticupload.Client, cfg deleteConfig) error {
resp, err := client.ListObjectsV2(ctx, &s3.ListObjectsV2Input{
Bucket: aws.String(cfg.bucket),
Expand All @@ -48,7 +46,7 @@ func deleteRecursive(ctx context.Context, path string, client *staticupload.Clie
Bucket: aws.String(cfg.bucket),
Delete: &s3types.Delete{
Objects: objIDs,
Quiet: ptr(true),
Quiet: toPtr(true),
},
})
if err != nil {
Expand All @@ -57,3 +55,7 @@ func deleteRecursive(ctx context.Context, path string, client *staticupload.Clie
}
return nil
}

func toPtr[T any](v T) *T {
return &v
}

0 comments on commit a4fa6a1

Please sign in to comment.