Skip to content

Commit 2fc00e4

Browse files
author
Aaron Schlesinger
committed
fix(pkg/gitreceive/storage/bucket.go): remove unused func
1 parent 6c45de6 commit 2fc00e4

1 file changed

Lines changed: 0 additions & 17 deletions

File tree

pkg/gitreceive/storage/bucket.go

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,6 @@ var (
1515
ACLPublicRead = aws.String("public-read")
1616
)
1717

18-
// BucketExists returns if a bucket exists in the S3 API compatible storage
19-
func BucketExists(svc *s3.S3, bucketName string) (bool, error) {
20-
_, err := svc.HeadBucket(&s3.HeadBucketInput{
21-
Bucket: aws.String(bucketName),
22-
})
23-
if err != nil {
24-
if awsErr, ok := err.(awserr.Error); ok {
25-
if awsErr.Code() == "404" {
26-
return false, nil
27-
}
28-
}
29-
30-
return false, err
31-
}
32-
return true, nil
33-
}
34-
3518
// CreateBucket creates a new bucket in the S3 API compatible storage or
3619
// return an error in case the bucket already exists
3720
func CreateBucket(svc *s3.S3, bucketName string) error {

0 commit comments

Comments
 (0)