We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c45de6 commit 2fc00e4Copy full SHA for 2fc00e4
1 file changed
pkg/gitreceive/storage/bucket.go
@@ -15,23 +15,6 @@ var (
15
ACLPublicRead = aws.String("public-read")
16
)
17
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
35
// CreateBucket creates a new bucket in the S3 API compatible storage or
36
// return an error in case the bucket already exists
37
func CreateBucket(svc *s3.S3, bucketName string) error {
0 commit comments