Skip to content

Commit

Permalink
chore: Run gofmt on new VFS code
Browse files Browse the repository at this point in the history
  • Loading branch information
tazjin committed Jan 26, 2017
1 parent 3574a03 commit 3b6e3bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 6 additions & 6 deletions util/pkg/vfs/s3context.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import (
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/golang/glog"
"os"
"sync"
"github.com/aws/aws-sdk-go/service/ec2"
"time"
)

Expand Down Expand Up @@ -121,7 +121,7 @@ func bruteforceBucketLocation(region *string, request *s3.GetBucketLocationInput
session, _ := session.NewSession(&aws.Config{Region: region})
regions, err := ec2.New(session).DescribeRegions(nil)

if (err != nil) {
if err != nil {
return nil, fmt.Errorf("Unable to list AWS regions: %v", err)
}

Expand All @@ -133,16 +133,16 @@ func bruteforceBucketLocation(region *string, request *s3.GetBucketLocationInput
s3Client := s3.New(session, &aws.Config{Region: aws.String(regionName)})
result, bucketError := s3Client.GetBucketLocation(request)

if (bucketError == nil) {
if bucketError == nil {
out <- result
}
} (*region.RegionName);
}(*region.RegionName)
}

select {
case bucketLocation := <-out:
return bucketLocation, nil
case <- time.After(5 * 1e9):
case <-time.After(5 * 1e9):
return nil, fmt.Errorf("Could not retrieve location for AWS bucket %s", *request.Bucket)
}
}
}
1 change: 0 additions & 1 deletion util/pkg/vfs/s3fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ func (p *S3Path) WriteFile(data []byte) error {
request.ACL = aws.String(acl)
}


// We don't need Content-MD5: https://github.com/aws/aws-sdk-go/issues/208

_, err = client.PutObject(request)
Expand Down

0 comments on commit 3b6e3bd

Please sign in to comment.