chore: Run gofmt on new VFS code

This commit is contained in:
Vincent Ambo 2017-01-26 12:30:04 +01:00
parent 3574a03898
commit 3b6e3bda56
2 changed files with 6 additions and 7 deletions

View File

@ -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"
)
@ -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)
}
@ -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)
}
}
}

View File

@ -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)