From 8cb8cb3405e241e1a80fc8f3a6f38cf57b7c391e Mon Sep 17 00:00:00 2001 From: "Frederick F. Kautz IV" Date: Thu, 30 Apr 2015 19:53:13 -0700 Subject: [PATCH] Running gofmt on aws-sdk-go --- .../aws-sdk-go/aws/awsutil/path_value_test.go | 4 +- .../aws-sdk-go/aws/param_validator_test.go | 10 ++--- .../awslabs/aws-sdk-go/aws/request_test.go | 14 +++---- .../internal/endpoints/endpoints_map.go | 42 +++++++++---------- .../internal/protocol/query/build_test.go | 13 +++--- .../internal/protocol/query/unmarshal_test.go | 1 - .../internal/protocol/restxml/build_test.go | 19 ++++----- .../protocol/restxml/unmarshal_test.go | 1 - .../protocol/xml/xmlutil/unmarshal.go | 2 +- .../protocol/xml/xmlutil/xml_to_struct.go | 2 +- .../aws-sdk-go/internal/signer/v4/v4.go | 2 +- .../service/s3/customizations_test.go | 8 ++-- .../aws-sdk-go/service/s3/examples_test.go | 20 ++++----- 13 files changed, 67 insertions(+), 71 deletions(-) diff --git a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/aws/awsutil/path_value_test.go b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/aws/awsutil/path_value_test.go index 88192736..f7022968 100644 --- a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/aws/awsutil/path_value_test.go +++ b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/aws/awsutil/path_value_test.go @@ -16,8 +16,8 @@ type Struct struct { } var data = Struct{ - A: []Struct{Struct{C: "value1"}, Struct{C: "value2"}, Struct{C: "value3"}}, - a: []Struct{Struct{C: "value1"}, Struct{C: "value2"}, Struct{C: "value3"}}, + A: []Struct{{C: "value1"}, {C: "value2"}, {C: "value3"}}, + a: []Struct{{C: "value1"}, {C: "value2"}, {C: "value3"}}, B: &Struct{B: &Struct{C: "terminal"}, D: &Struct{C: "terminal2"}}, C: "initial", } diff --git a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/aws/param_validator_test.go b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/aws/param_validator_test.go index 08deca15..952f2b28 100644 --- a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/aws/param_validator_test.go +++ b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/aws/param_validator_test.go @@ -40,8 +40,8 @@ func TestNoErrors(t *testing.T) { input := &StructShape{ RequiredList: []*ConditionalStructShape{}, RequiredMap: &map[string]*ConditionalStructShape{ - "key1": &ConditionalStructShape{Name: aws.String("Name")}, - "key2": &ConditionalStructShape{Name: aws.String("Name")}, + "key1": {Name: aws.String("Name")}, + "key2": {Name: aws.String("Name")}, }, RequiredBool: aws.Boolean(true), OptionalStruct: &ConditionalStructShape{Name: aws.String("Name")}, @@ -65,10 +65,10 @@ func TestMissingRequiredParameters(t *testing.T) { func TestNestedMissingRequiredParameters(t *testing.T) { input := &StructShape{ - RequiredList: []*ConditionalStructShape{&ConditionalStructShape{}}, + RequiredList: []*ConditionalStructShape{{}}, RequiredMap: &map[string]*ConditionalStructShape{ - "key1": &ConditionalStructShape{Name: aws.String("Name")}, - "key2": &ConditionalStructShape{}, + "key1": {Name: aws.String("Name")}, + "key2": {}, }, RequiredBool: aws.Boolean(true), OptionalStruct: &ConditionalStructShape{}, diff --git a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/aws/request_test.go b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/aws/request_test.go index 10597d78..11055036 100644 --- a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/aws/request_test.go +++ b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/aws/request_test.go @@ -62,9 +62,9 @@ type jsonErrorResponse struct { func TestRequestRecoverRetry(t *testing.T) { reqNum := 0 reqs := []http.Response{ - http.Response{StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, - http.Response{StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, - http.Response{StatusCode: 200, Body: body(`{"data":"valid"}`)}, + {StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, + {StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, + {StatusCode: 200, Body: body(`{"data":"valid"}`)}, } s := NewService(&Config{MaxRetries: 10}) @@ -92,10 +92,10 @@ func TestRequestExhaustRetries(t *testing.T) { reqNum := 0 reqs := []http.Response{ - http.Response{StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, - http.Response{StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, - http.Response{StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, - http.Response{StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, + {StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, + {StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, + {StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, + {StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, } s := NewService(&Config{MaxRetries: -1}) diff --git a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/endpoints/endpoints_map.go b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/endpoints/endpoints_map.go index 637fcbe4..894c1a64 100644 --- a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/endpoints/endpoints_map.go +++ b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/endpoints/endpoints_map.go @@ -15,74 +15,74 @@ type endpointEntry struct { var endpointsMap = endpointStruct{ Version: 2, Endpoints: map[string]endpointEntry{ - "*/*": endpointEntry{ + "*/*": { Endpoint: "{service}.{region}.amazonaws.com", }, - "*/cloudfront": endpointEntry{ + "*/cloudfront": { Endpoint: "cloudfront.amazonaws.com", SigningRegion: "us-east-1", }, - "*/cloudsearchdomain": endpointEntry{ + "*/cloudsearchdomain": { Endpoint: "", SigningRegion: "us-east-1", }, - "*/iam": endpointEntry{ + "*/iam": { Endpoint: "iam.amazonaws.com", SigningRegion: "us-east-1", }, - "*/importexport": endpointEntry{ + "*/importexport": { Endpoint: "importexport.amazonaws.com", SigningRegion: "us-east-1", }, - "*/route53": endpointEntry{ + "*/route53": { Endpoint: "route53.amazonaws.com", SigningRegion: "us-east-1", }, - "*/sts": endpointEntry{ + "*/sts": { Endpoint: "sts.amazonaws.com", SigningRegion: "us-east-1", }, - "ap-northeast-1/s3": endpointEntry{ + "ap-northeast-1/s3": { Endpoint: "s3-{region}.amazonaws.com", }, - "ap-southeast-1/s3": endpointEntry{ + "ap-southeast-1/s3": { Endpoint: "s3-{region}.amazonaws.com", }, - "ap-southeast-2/s3": endpointEntry{ + "ap-southeast-2/s3": { Endpoint: "s3-{region}.amazonaws.com", }, - "cn-north-1/*": endpointEntry{ + "cn-north-1/*": { Endpoint: "{service}.{region}.amazonaws.com.cn", }, - "eu-central-1/s3": endpointEntry{ + "eu-central-1/s3": { Endpoint: "{service}.{region}.amazonaws.com", }, - "eu-west-1/s3": endpointEntry{ + "eu-west-1/s3": { Endpoint: "s3-{region}.amazonaws.com", }, - "sa-east-1/s3": endpointEntry{ + "sa-east-1/s3": { Endpoint: "s3-{region}.amazonaws.com", }, - "us-east-1/s3": endpointEntry{ + "us-east-1/s3": { Endpoint: "s3.amazonaws.com", }, - "us-east-1/sdb": endpointEntry{ + "us-east-1/sdb": { Endpoint: "sdb.amazonaws.com", SigningRegion: "us-east-1", }, - "us-gov-west-1/iam": endpointEntry{ + "us-gov-west-1/iam": { Endpoint: "iam.us-gov.amazonaws.com", }, - "us-gov-west-1/s3": endpointEntry{ + "us-gov-west-1/s3": { Endpoint: "s3-{region}.amazonaws.com", }, - "us-gov-west-1/sts": endpointEntry{ + "us-gov-west-1/sts": { Endpoint: "sts.us-gov-west-1.amazonaws.com", }, - "us-west-1/s3": endpointEntry{ + "us-west-1/s3": { Endpoint: "s3-{region}.amazonaws.com", }, - "us-west-2/s3": endpointEntry{ + "us-west-2/s3": { Endpoint: "s3-{region}.amazonaws.com", }, }, diff --git a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/protocol/query/build_test.go b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/protocol/query/build_test.go index 43897613..48bae0a0 100644 --- a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/protocol/query/build_test.go +++ b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/protocol/query/build_test.go @@ -1494,10 +1494,10 @@ func TestInputService9ProtocolTestRecursiveShapesCase4(t *testing.T) { input := &InputService9TestShapeInputShape{ RecursiveStruct: &InputService9TestShapeInputService9TestShapeRecursiveStructType{ RecursiveList: []*InputService9TestShapeInputService9TestShapeRecursiveStructType{ - &InputService9TestShapeInputService9TestShapeRecursiveStructType{ + { NoRecurse: aws.String("foo"), }, - &InputService9TestShapeInputService9TestShapeRecursiveStructType{ + { NoRecurse: aws.String("bar"), }, }, @@ -1529,10 +1529,10 @@ func TestInputService9ProtocolTestRecursiveShapesCase5(t *testing.T) { input := &InputService9TestShapeInputShape{ RecursiveStruct: &InputService9TestShapeInputService9TestShapeRecursiveStructType{ RecursiveList: []*InputService9TestShapeInputService9TestShapeRecursiveStructType{ - &InputService9TestShapeInputService9TestShapeRecursiveStructType{ + { NoRecurse: aws.String("foo"), }, - &InputService9TestShapeInputService9TestShapeRecursiveStructType{ + { RecursiveStruct: &InputService9TestShapeInputService9TestShapeRecursiveStructType{ NoRecurse: aws.String("bar"), }, @@ -1566,10 +1566,10 @@ func TestInputService9ProtocolTestRecursiveShapesCase6(t *testing.T) { input := &InputService9TestShapeInputShape{ RecursiveStruct: &InputService9TestShapeInputService9TestShapeRecursiveStructType{ RecursiveMap: &map[string]*InputService9TestShapeInputService9TestShapeRecursiveStructType{ - "bar": &InputService9TestShapeInputService9TestShapeRecursiveStructType{ + "bar": { NoRecurse: aws.String("bar"), }, - "foo": &InputService9TestShapeInputService9TestShapeRecursiveStructType{ + "foo": { NoRecurse: aws.String("foo"), }, }, @@ -1593,4 +1593,3 @@ func TestInputService9ProtocolTestRecursiveShapesCase6(t *testing.T) { // assert headers } - diff --git a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/protocol/query/unmarshal_test.go b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/protocol/query/unmarshal_test.go index 4acc75c5..3fb843f5 100644 --- a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/protocol/query/unmarshal_test.go +++ b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/protocol/query/unmarshal_test.go @@ -1542,4 +1542,3 @@ func TestOutputService14ProtocolTestNamedMapCase1(t *testing.T) { assert.Equal(t, "bar", *(*out.Map)["qux"]) } - diff --git a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/protocol/restxml/build_test.go b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/protocol/restxml/build_test.go index 7fc3dec0..439bbabf 100644 --- a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/protocol/restxml/build_test.go +++ b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/protocol/restxml/build_test.go @@ -2346,13 +2346,13 @@ func TestInputService9ProtocolTestListOfStructuresCase1(t *testing.T) { input := &InputService9TestShapeInputShape{ ListParam: []*InputService9TestShapeSingleFieldStruct{ - &InputService9TestShapeSingleFieldStruct{ + { Element: aws.String("one"), }, - &InputService9TestShapeSingleFieldStruct{ + { Element: aws.String("two"), }, - &InputService9TestShapeSingleFieldStruct{ + { Element: aws.String("three"), }, }, @@ -2741,10 +2741,10 @@ func TestInputService18ProtocolTestRecursiveShapesCase4(t *testing.T) { input := &InputService18TestShapeInputShape{ RecursiveStruct: &InputService18TestShapeRecursiveStructType{ RecursiveList: []*InputService18TestShapeRecursiveStructType{ - &InputService18TestShapeRecursiveStructType{ + { NoRecurse: aws.String("foo"), }, - &InputService18TestShapeRecursiveStructType{ + { NoRecurse: aws.String("bar"), }, }, @@ -2776,10 +2776,10 @@ func TestInputService18ProtocolTestRecursiveShapesCase5(t *testing.T) { input := &InputService18TestShapeInputShape{ RecursiveStruct: &InputService18TestShapeRecursiveStructType{ RecursiveList: []*InputService18TestShapeRecursiveStructType{ - &InputService18TestShapeRecursiveStructType{ + { NoRecurse: aws.String("foo"), }, - &InputService18TestShapeRecursiveStructType{ + { RecursiveStruct: &InputService18TestShapeRecursiveStructType{ NoRecurse: aws.String("bar"), }, @@ -2813,10 +2813,10 @@ func TestInputService18ProtocolTestRecursiveShapesCase6(t *testing.T) { input := &InputService18TestShapeInputShape{ RecursiveStruct: &InputService18TestShapeRecursiveStructType{ RecursiveMap: &map[string]*InputService18TestShapeRecursiveStructType{ - "bar": &InputService18TestShapeRecursiveStructType{ + "bar": { NoRecurse: aws.String("bar"), }, - "foo": &InputService18TestShapeRecursiveStructType{ + "foo": { NoRecurse: aws.String("foo"), }, }, @@ -2862,4 +2862,3 @@ func TestInputService19ProtocolTestTimestampInHeaderCase1(t *testing.T) { assert.Equal(t, "Sun, 25 Jan 2015 08:00:00 GMT", r.Header.Get("x-amz-timearg")) } - diff --git a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/protocol/restxml/unmarshal_test.go b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/protocol/restxml/unmarshal_test.go index d15f8c54..d1383a12 100644 --- a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/protocol/restxml/unmarshal_test.go +++ b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/protocol/restxml/unmarshal_test.go @@ -1318,4 +1318,3 @@ func TestOutputService11ProtocolTestScalarMembersInHeadersCase1(t *testing.T) { assert.Equal(t, true, *out.TrueBool) } - diff --git a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/protocol/xml/xmlutil/unmarshal.go b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/protocol/xml/xmlutil/unmarshal.go index d5b7d71b..89c64f2c 100644 --- a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/protocol/xml/xmlutil/unmarshal.go +++ b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/protocol/xml/xmlutil/unmarshal.go @@ -107,7 +107,7 @@ func parseStruct(r reflect.Value, node *XMLNode, tag reflect.StructTag) error { for _, a := range node.Attr { if name == a.Name.Local { // turn this into a text node for de-serializing - elems = []*XMLNode{&XMLNode{Text: a.Value}} + elems = []*XMLNode{{Text: a.Value}} } } } diff --git a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/protocol/xml/xmlutil/xml_to_struct.go b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/protocol/xml/xmlutil/xml_to_struct.go index b6a1cfad..6e92da3e 100644 --- a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/protocol/xml/xmlutil/xml_to_struct.go +++ b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/protocol/xml/xmlutil/xml_to_struct.go @@ -77,7 +77,7 @@ func StructToXML(e *xml.Encoder, node *XMLNode, sorted bool) error { e.EncodeToken(xml.CharData([]byte(node.Text))) } else if sorted { sortedNames := []string{} - for k, _ := range node.Children { + for k := range node.Children { sortedNames = append(sortedNames, k) } sort.Strings(sortedNames) diff --git a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/signer/v4/v4.go b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/signer/v4/v4.go index 0a264054..89e677e1 100644 --- a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/signer/v4/v4.go +++ b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/signer/v4/v4.go @@ -186,7 +186,7 @@ func (v4 *signer) buildQuery() { func (v4 *signer) buildCanonicalHeaders() { headers := make([]string, 0) headers = append(headers, "host") - for k, _ := range v4.Request.Header { + for k := range v4.Request.Header { if _, ok := ignoredHeaders[http.CanonicalHeaderKey(k)]; ok { continue // ignored header } diff --git a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/service/s3/customizations_test.go b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/service/s3/customizations_test.go index 2d6e04de..f9675870 100644 --- a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/service/s3/customizations_test.go +++ b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/service/s3/customizations_test.go @@ -27,7 +27,7 @@ func TestMD5InPutBucketCORS(t *testing.T) { Bucket: aws.String("bucketname"), CORSConfiguration: &s3.CORSConfiguration{ CORSRules: []*s3.CORSRule{ - &s3.CORSRule{AllowedMethods: []*string{aws.String("GET")}}, + {AllowedMethods: []*string{aws.String("GET")}}, }, }, }) @@ -40,7 +40,7 @@ func TestMD5InPutBucketLifecycle(t *testing.T) { Bucket: aws.String("bucketname"), LifecycleConfiguration: &s3.LifecycleConfiguration{ Rules: []*s3.LifecycleRule{ - &s3.LifecycleRule{ + { ID: aws.String("ID"), Prefix: aws.String("Prefix"), Status: aws.String("Enabled"), @@ -57,7 +57,7 @@ func TestMD5InPutBucketTagging(t *testing.T) { Bucket: aws.String("bucketname"), Tagging: &s3.Tagging{ TagSet: []*s3.Tag{ - &s3.Tag{Key: aws.String("KEY"), Value: aws.String("VALUE")}, + {Key: aws.String("KEY"), Value: aws.String("VALUE")}, }, }, }) @@ -70,7 +70,7 @@ func TestMD5InDeleteObjects(t *testing.T) { Bucket: aws.String("bucketname"), Delete: &s3.Delete{ Objects: []*s3.ObjectIdentifier{ - &s3.ObjectIdentifier{Key: aws.String("key")}, + {Key: aws.String("key")}, }, }, }) diff --git a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/service/s3/examples_test.go b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/service/s3/examples_test.go index e8a73b40..3471b6b2 100644 --- a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/service/s3/examples_test.go +++ b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/service/s3/examples_test.go @@ -45,7 +45,7 @@ func ExampleS3_CompleteMultipartUpload() { UploadID: aws.String("MultipartUploadId"), // Required MultipartUpload: &s3.CompletedMultipartUpload{ Parts: []*s3.CompletedPart{ - &s3.CompletedPart{ // Required + { // Required ETag: aws.String("ETag"), PartNumber: aws.Long(1), }, @@ -365,7 +365,7 @@ func ExampleS3_DeleteObjects() { Bucket: aws.String("BucketName"), // Required Delete: &s3.Delete{ // Required Objects: []*s3.ObjectIdentifier{ // Required - &s3.ObjectIdentifier{ // Required + { // Required Key: aws.String("ObjectKey"), // Required VersionID: aws.String("ObjectVersionId"), }, @@ -891,7 +891,7 @@ func ExampleS3_PutBucketACL() { ACL: aws.String("BucketCannedACL"), AccessControlPolicy: &s3.AccessControlPolicy{ Grants: []*s3.Grant{ - &s3.Grant{ // Required + { // Required Grantee: &s3.Grantee{ Type: aws.String("Type"), // Required DisplayName: aws.String("DisplayName"), @@ -935,7 +935,7 @@ func ExampleS3_PutBucketCORS() { Bucket: aws.String("BucketName"), // Required CORSConfiguration: &s3.CORSConfiguration{ CORSRules: []*s3.CORSRule{ - &s3.CORSRule{ // Required + { // Required AllowedHeaders: []*string{ aws.String("AllowedHeader"), // Required // More values... @@ -979,7 +979,7 @@ func ExampleS3_PutBucketLifecycle() { Bucket: aws.String("BucketName"), // Required LifecycleConfiguration: &s3.LifecycleConfiguration{ Rules: []*s3.LifecycleRule{ // Required - &s3.LifecycleRule{ // Required + { // Required Prefix: aws.String("Prefix"), // Required Status: aws.String("ExpirationStatus"), // Required Expiration: &s3.LifecycleExpiration{ @@ -1027,7 +1027,7 @@ func ExampleS3_PutBucketLogging() { LoggingEnabled: &s3.LoggingEnabled{ TargetBucket: aws.String("TargetBucket"), TargetGrants: []*s3.TargetGrant{ - &s3.TargetGrant{ // Required + { // Required Grantee: &s3.Grantee{ Type: aws.String("Type"), // Required DisplayName: aws.String("DisplayName"), @@ -1136,7 +1136,7 @@ func ExampleS3_PutBucketReplication() { ReplicationConfiguration: &s3.ReplicationConfiguration{ // Required Role: aws.String("Role"), // Required Rules: []*s3.ReplicationRule{ // Required - &s3.ReplicationRule{ // Required + { // Required Destination: &s3.Destination{ // Required Bucket: aws.String("BucketName"), // Required }, @@ -1192,7 +1192,7 @@ func ExampleS3_PutBucketTagging() { Bucket: aws.String("BucketName"), // Required Tagging: &s3.Tagging{ // Required TagSet: []*s3.Tag{ // Required - &s3.Tag{ // Required + { // Required Key: aws.String("ObjectKey"), // Required Value: aws.String("Value"), // Required }, @@ -1256,7 +1256,7 @@ func ExampleS3_PutBucketWebsite() { Protocol: aws.String("Protocol"), }, RoutingRules: []*s3.RoutingRule{ - &s3.RoutingRule{ // Required + { // Required Redirect: &s3.Redirect{ // Required HTTPRedirectCode: aws.String("HttpRedirectCode"), HostName: aws.String("HostName"), @@ -1342,7 +1342,7 @@ func ExampleS3_PutObjectACL() { ACL: aws.String("ObjectCannedACL"), AccessControlPolicy: &s3.AccessControlPolicy{ Grants: []*s3.Grant{ - &s3.Grant{ // Required + { // Required Grantee: &s3.Grantee{ Type: aws.String("Type"), // Required DisplayName: aws.String("DisplayName"),