From 46e719fca2bc2e795151e5e5e49514bee273f439 Mon Sep 17 00:00:00 2001 From: skotambkar Date: Wed, 18 Sep 2019 18:13:45 -0700 Subject: [PATCH 1/8] Removes references to the older versions of go --- .travis.yml | 2 - Makefile | 16 +--- README.md | 2 +- aws/arn/arn_test.go | 2 - aws/client.go | 15 ++-- aws/client_logger_test.go | 5 +- aws/config.go | 9 -- aws/credentials.go | 4 +- aws/defaults/defaults_test.go | 1 - aws/defaults/handlers.go | 6 +- aws/external/local.go | 5 +- aws/http_client.go | 16 ---- aws/request.go | 35 ++------ aws/request_context_test.go | 4 +- aws/request_pagination.go | 2 +- aws/request_test.go | 1 - aws/retryer.go | 5 +- aws/signer/v4/functional_1_5_test.go | 86 ------------------- aws/signer/v4/functional_test.go | 74 ++++++++++++++++ aws/signer/v4/uri_path.go | 2 - aws/stscreds/provider.go | 2 +- aws/url.go | 3 +- aws/url_1_7.go | 29 ------- .../aws/request/withContext/withContext.go | 2 +- .../awstesting/sandbox/Dockerfile.test.go1.10 | 11 --- .../awstesting/sandbox/Dockerfile.test.go1.9 | 11 --- internal/ini/ini_lexer_test.go | 2 - internal/ini/ini_parser_test.go | 2 - internal/ini/literal_tokens_test.go | 2 - internal/ini/number_helper_test.go | 2 - internal/ini/op_tokens_test.go | 2 - internal/ini/parse_stack_test.go | 2 - internal/ini/sep_tokens_test.go | 2 - internal/ini/skipper_test.go | 2 - internal/ini/value_util_test.go | 2 - internal/ini/walker_test.go | 7 +- internal/sdkmath/floor.go | 2 - internal/sdkmath/floor_go1.9.go | 56 ------------ 38 files changed, 111 insertions(+), 322 deletions(-) delete mode 100644 aws/defaults/defaults_test.go delete mode 100644 aws/signer/v4/functional_1_5_test.go delete mode 100644 aws/url_1_7.go delete mode 100644 internal/awstesting/sandbox/Dockerfile.test.go1.10 delete mode 100644 internal/awstesting/sandbox/Dockerfile.test.go1.9 delete mode 100644 internal/sdkmath/floor_go1.9.go diff --git a/.travis.yml b/.travis.yml index 546a4aa994b..5c93dfa9d6c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,6 @@ os: - linux - osx go: - - 1.9.x - - 1.10.x - 1.11.x - 1.12.x - tip diff --git a/Makefile b/Makefile index e247d62ef11..c9713af51da 100644 --- a/Makefile +++ b/Makefile @@ -100,21 +100,7 @@ cleanup-integ-buckets: ################### # Sandbox Testing # ################### -sandbox-tests: sandbox-test-go1.9 sandbox-test-go1.10 sandbox-test-go1.11 sandbox-test-go1.12 sandbox-test-gotip - -sandbox-build-go1.9: - docker build -f ./internal/awstesting/sandbox/Dockerfile.test.go1.9 -t "aws-sdk-go-1.9" . -sandbox-go1.9: sandbox-build-go1.9 - docker run -i -t aws-sdk-go-1.9 bash -sandbox-test-go1.9: sandbox-build-go1.9 - docker run -t aws-sdk-go-1.9 - -sandbox-build-go1.10: - docker build -f ./internal/awstesting/sandbox/Dockerfile.test.go1.10 -t "aws-sdk-go-1.10" . -sandbox-go1.10: sandbox-build-go1.10 - docker run -i -t aws-sdk-go-1.10 bash -sandbox-test-go1.10: sandbox-build-go1.10 - docker run -t aws-sdk-go-1.10 +sandbox-tests: sandbox-test-go1.11 sandbox-test-go1.12 sandbox-test-gotip sandbox-build-go1.11: docker build -f ./internal/awstesting/sandbox/Dockerfile.test.go1.11 -t "aws-sdk-go-1.11" . diff --git a/README.md b/README.md index 9283fa15630..d744329119a 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ `aws-sdk-go-v2` is the **Developer Preview** for the v2 AWS SDK for the Go programming language. While in Developer Preview (aka **beta**) the SDK may release minor version changes that break backwards compatability. The release notes for the breaking change will include information about the breaking change, and how you can migrate to the latest version. -Check out the [Issues] and [Projects] for design and updates being made to the SDK. The v2 SDK requires a minimum version of Go 1.9. +Check out the [Issues] and [Projects] for design and updates being made to the SDK. The v2 SDK requires a minimum version of Go 1.11. We'll be expanding out the [Issues] and [Projects] sections with additional changes to the SDK based on your feedback, and SDK's core's improvements. Check the the SDK's [CHANGE_LOG] for information about the latest updates to the SDK. diff --git a/aws/arn/arn_test.go b/aws/arn/arn_test.go index 3dda7843aca..363b4946e76 100644 --- a/aws/arn/arn_test.go +++ b/aws/arn/arn_test.go @@ -1,5 +1,3 @@ -// +build go1.7 - package arn import ( diff --git a/aws/client.go b/aws/client.go index ffbfc3df357..ad3b049ce3f 100644 --- a/aws/client.go +++ b/aws/client.go @@ -22,21 +22,16 @@ type Metadata struct { // A Client implements the base client request and response handling // used by all service clients. type Client struct { - Metadata Metadata - - Config Config - + Metadata Metadata + Config Config Region string Credentials CredentialsProvider EndpointResolver EndpointResolver Handlers Handlers Retryer Retryer - - // TODO replace with value not pointer - LogLevel LogLevel - Logger Logger - - HTTPClient HTTPClient + LogLevel LogLevel + Logger Logger + HTTPClient HTTPClient } // NewClient will return a pointer to a new initialized service client. diff --git a/aws/client_logger_test.go b/aws/client_logger_test.go index 7d78ff550b0..7d0cdd650bd 100644 --- a/aws/client_logger_test.go +++ b/aws/client_logger_test.go @@ -109,7 +109,10 @@ func TestLogRequest(t *testing.T) { struct{}{}, nil, ) req.SetReaderBody(c.Body) - req.Build() + err := req.Build() + if err != nil { + t.Fatalf("failed to build request, %d", err) + } logRequest(req) diff --git a/aws/config.go b/aws/config.go index a695e684170..a18ffb6750c 100644 --- a/aws/config.go +++ b/aws/config.go @@ -55,15 +55,6 @@ type Config struct { // standard out. Logger Logger - // EnforceShouldRetryCheck is used in the AfterRetryHandler to always call - // ShouldRetry regardless of whether or not if request.Retryable is set. - // This will utilize ShouldRetry method of custom retryers. If EnforceShouldRetryCheck - // is not set, then ShouldRetry will only be called if request.Retryable is nil. - // Proper handling of the request.Retryable field is important when setting this field. - // - // TODO this config field is depercated and needs removed. - EnforceShouldRetryCheck bool - // DisableRestProtocolURICleaning will not clean the URL path when making // rest protocol requests. Will default to false. This would only be used // for empty directory names in s3 requests. diff --git a/aws/credentials.go b/aws/credentials.go index db93f59d02b..035e2ac53ff 100644 --- a/aws/credentials.go +++ b/aws/credentials.go @@ -92,9 +92,9 @@ type SafeCredentialsProvider struct { // Retrieve returns the credentials. If the credentials have already been // retrieved, and not expired the cached credentials will be returned. If the -// credentails have not been retrieved yet, or expired RetrieveFn will be called. +// credentials have not been retrieved yet, or expired RetrieveFn will be called. // -// Retruns and error if RetrieveFn returns an error. +// Returns and error if RetrieveFn returns an error. func (p *SafeCredentialsProvider) Retrieve() (Credentials, error) { if creds := p.getCreds(); creds != nil { return *creds, nil diff --git a/aws/defaults/defaults_test.go b/aws/defaults/defaults_test.go deleted file mode 100644 index 20c56eff6a9..00000000000 --- a/aws/defaults/defaults_test.go +++ /dev/null @@ -1 +0,0 @@ -package defaults diff --git a/aws/defaults/handlers.go b/aws/defaults/handlers.go index 7711f9fbace..272be2917f9 100644 --- a/aws/defaults/handlers.go +++ b/aws/defaults/handlers.go @@ -189,12 +189,12 @@ var AfterRetryHandler = aws.NamedHandler{ Fn: func(r *aws.Request) { // If one of the other handlers already set the retry state // we don't want to override it based on the service's state - if r.Retryable == nil || r.Config.EnforceShouldRetryCheck { - r.Retryable = aws.Bool(r.ShouldRetry(r)) + if r.Retryable == nil { + r.Retryable = aws.Bool(r.Retryer.ShouldRetry(r)) } if r.WillRetry() { - r.RetryDelay = r.RetryRules(r) + r.RetryDelay = r.Retryer.RetryRules(r) if err := sdk.SleepWithContext(r.Context(), r.RetryDelay); err != nil { r.Error = awserr.New(aws.ErrCodeRequestCanceled, diff --git a/aws/external/local.go b/aws/external/local.go index c5337f2e16a..0564fb746b4 100644 --- a/aws/external/local.go +++ b/aws/external/local.go @@ -4,8 +4,6 @@ import ( "fmt" "net" "net/url" - - "github.com/aws/aws-sdk-go-v2/aws" ) var lookupHostFn = net.LookupHost @@ -40,7 +38,8 @@ func validateLocalURL(v string) error { return err } - host := aws.URLHostname(u) + // Todo: remove url.go if this works for +go1.11 + host := u.Hostname() if len(host) == 0 { return fmt.Errorf("unable to parse host from local HTTP cred provider URL") } else if isLoopback, err := isLoopbackHost(host); err != nil { diff --git a/aws/http_client.go b/aws/http_client.go index 60dcbdaab64..054737acb9c 100644 --- a/aws/http_client.go +++ b/aws/http_client.go @@ -47,22 +47,6 @@ type BuildableHTTPClient struct { client *http.Client } -//type withTransportOptions interface { -// WithTransportOptions(...func(*http.Transport)) HTTPClient -//} -// -//type getTransport interface { -// GetTransport() *http.Transport -//} -// -//type withDialerOptions interface { -// WithDialerOptions(...func(*net.Dialer)) HTTPClient -//} -// -//type getDialer interface { -// GetDialer() *net.Dialer -//} - // NewBuildableHTTPClient returns an initialized client for invoking HTTP // requests. func NewBuildableHTTPClient() *BuildableHTTPClient { diff --git a/aws/request.go b/aws/request.go index afd9022f4ff..85d7c0ab94f 100644 --- a/aws/request.go +++ b/aws/request.go @@ -34,11 +34,10 @@ const ( // A Request is the service request to be made. type Request struct { - Config Config - Metadata Metadata - Handlers Handlers - - Retryer + Config Config + Metadata Metadata + Handlers Handlers + Retryer Retryer AttemptTime time.Time Time time.Time ExpireTime time.Duration @@ -220,11 +219,6 @@ func (r *Request) Context() context.Context { // Request. It is not safe to use use a single Request value for multiple // requests. A new Request should be created for each API operation request. // -// Go 1.6 and below: -// The http.Request's Cancel field will be set to the Done() value of -// the context. This will overwrite the Cancel field's value. -// -// Go 1.7 and above: // The http.Request.WithContext will be used to set the context on the underlying // http.Request. This will create a shallow copy of the http.Request. The SDK // may create sub contexts in the future for nested requests such as retries. @@ -240,7 +234,7 @@ func (r *Request) WillRetry() bool { if !IsReaderSeekable(r.Body) && r.HTTPRequest.Body != http.NoBody { return false } - return r.Error != nil && BoolValue(r.Retryable) && r.RetryCount < r.MaxRetries() + return r.Error != nil && BoolValue(r.Retryable) && r.RetryCount < r.Retryer.MaxRetries() } // fmtAttemptCount returns a formatted string with attempt count @@ -389,19 +383,6 @@ func (r *Request) getNextRequestBody() (body io.ReadCloser, err error) { "failed to get request body error", err) } - // Go 1.8 tightened and clarified the rules code needs to use when building - // requests with the http package. Go 1.8 removed the automatic detection - // of if the Request.Body was empty, or actually had bytes in it. The SDK - // always sets the Request.Body even if it is empty and should not actually - // be sent. This is incorrect. - // - // Go 1.8 did add a http.NoBody value that the SDK can use to tell the http - // client that the request really should be sent without a body. The - // Request.Body cannot be set to nil, which is preferable, because the - // field is exported and could introduce nil pointer dereferences for users - // of the SDK if they used that field. - // - // Related golang/go#18257 l, err := SeekerLen(r.Body) if err != nil { return nil, awserr.New(ErrCodeSerialization, @@ -522,7 +503,7 @@ func (r *Request) sendRequest() (sendErr error) { r.Handlers.Send.Run(r) if r.Error != nil { debugLogReqError(r, "Send Request", - fmtAttemptCount(r.RetryCount, r.MaxRetries()), + fmtAttemptCount(r.RetryCount, r.Retryer.MaxRetries()), r.Error) return r.Error } @@ -532,7 +513,7 @@ func (r *Request) sendRequest() (sendErr error) { if r.Error != nil { r.Handlers.UnmarshalError.Run(r) debugLogReqError(r, "Validate Response", - fmtAttemptCount(r.RetryCount, r.MaxRetries()), + fmtAttemptCount(r.RetryCount, r.Retryer.MaxRetries()), r.Error) return r.Error } @@ -540,7 +521,7 @@ func (r *Request) sendRequest() (sendErr error) { r.Handlers.Unmarshal.Run(r) if r.Error != nil { debugLogReqError(r, "Unmarshal Response", - fmtAttemptCount(r.RetryCount, r.MaxRetries()), + fmtAttemptCount(r.RetryCount, r.Retryer.MaxRetries()), r.Error) return r.Error } diff --git a/aws/request_context_test.go b/aws/request_context_test.go index fb1a426a775..6b323fc7495 100644 --- a/aws/request_context_test.go +++ b/aws/request_context_test.go @@ -29,9 +29,7 @@ func TestRequest_SetContext(t *testing.T) { t.Fatalf("expected error, got none") } - // Only check against canceled because go 1.6 will not use the context's - // Err(). - if e, a := "canceled", err.Error(); !strings.Contains(a, e) { + if e, a := ctx.Error.Error(), err.Error(); !strings.Contains(a, e) { t.Errorf("expect %q to be in %q, but was not", e, a) } } diff --git a/aws/request_pagination.go b/aws/request_pagination.go index 3ca3627d5e5..815586aaa98 100644 --- a/aws/request_pagination.go +++ b/aws/request_pagination.go @@ -137,7 +137,7 @@ func (r *Request) nextPageTokens() []interface{} { } } - tokens := []interface{}{} + var tokens []interface{} tokenAdded := false for _, outToken := range r.Operation.OutputTokens { vs, _ := awsutil.ValuesAtPath(r.Data, outToken) diff --git a/aws/request_test.go b/aws/request_test.go index abb6d63e1d2..e6fa4c30289 100644 --- a/aws/request_test.go +++ b/aws/request_test.go @@ -844,7 +844,6 @@ func TestEnforceShouldRetryCheck(t *testing.T) { cfg.EndpointResolver = aws.ResolveWithEndpointURL(server.URL) cfg.Retryer = retryer cfg.HTTPClient = client - cfg.EnforceShouldRetryCheck = true s := awstesting.NewClient(cfg) diff --git a/aws/retryer.go b/aws/retryer.go index b4d329f2dba..afaae30a593 100644 --- a/aws/retryer.go +++ b/aws/retryer.go @@ -152,6 +152,7 @@ func shouldRetryError(origErr error) bool { } // *url.Error only implements Temporary after golang 1.6 but since // url.Error only wraps the error: + // Todo: Investigate use case for this error case for +Go1.11 return shouldRetryError(err.Err) case temporary: @@ -170,9 +171,7 @@ func shouldRetryError(origErr error) bool { default: switch err.Error() { - case "net/http: request canceled", - "net/http: request canceled while waiting for connection": - // known 1.5 error case when an http request is cancelled + case "net/http: request canceled": return false } // here we don't know the error; so we allow a retry. diff --git a/aws/signer/v4/functional_1_5_test.go b/aws/signer/v4/functional_1_5_test.go deleted file mode 100644 index 306ef5a9208..00000000000 --- a/aws/signer/v4/functional_1_5_test.go +++ /dev/null @@ -1,86 +0,0 @@ -// +build go1.5 - -package v4_test - -import ( - "fmt" - "net/http" - "testing" - "time" - - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" - "github.com/aws/aws-sdk-go-v2/internal/awstesting/unit" -) - -func TestStandaloneSign(t *testing.T) { - creds := unit.Config().Credentials - signer := v4.NewSigner(creds) - - for _, c := range standaloneSignCases { - host := fmt.Sprintf("https://%s.%s.%s.amazonaws.com", - c.SubDomain, c.Region, c.Service) - - req, err := http.NewRequest("GET", host, nil) - if err != nil { - t.Errorf("expected no error, but received %v", err) - } - - // URL.EscapedPath() will be used by the signer to get the - // escaped form of the request's URI path. - req.URL.Path = c.OrigURI - req.URL.RawQuery = c.OrigQuery - - _, err = signer.Sign(req, nil, c.Service, c.Region, time.Unix(0, 0)) - if err != nil { - t.Errorf("expected no error, but received %v", err) - } - - actual := req.Header.Get("Authorization") - if e, a := c.ExpSig, actual; e != a { - t.Errorf("expected %v, but recieved %v", e, a) - } - if e, a := c.OrigURI, req.URL.Path; e != a { - t.Errorf("expected %v, but recieved %v", e, a) - } - if e, a := c.EscapedURI, req.URL.EscapedPath(); e != a { - t.Errorf("expected %v, but recieved %v", e, a) - } - } -} - -func TestStandaloneSign_RawPath(t *testing.T) { - creds := unit.Config().Credentials - signer := v4.NewSigner(creds) - - for _, c := range standaloneSignCases { - host := fmt.Sprintf("https://%s.%s.%s.amazonaws.com", - c.SubDomain, c.Region, c.Service) - - req, err := http.NewRequest("GET", host, nil) - if err != nil { - t.Errorf("expected no error, but received %v", err) - } - - // URL.EscapedPath() will be used by the signer to get the - // escaped form of the request's URI path. - req.URL.Path = c.OrigURI - req.URL.RawPath = c.EscapedURI - req.URL.RawQuery = c.OrigQuery - - _, err = signer.Sign(req, nil, c.Service, c.Region, time.Unix(0, 0)) - if err != nil { - t.Errorf("expected no error, but received %v", err) - } - - actual := req.Header.Get("Authorization") - if e, a := c.ExpSig, actual; e != a { - t.Errorf("expected %v, but recieved %v", e, a) - } - if e, a := c.OrigURI, req.URL.Path; e != a { - t.Errorf("expected %v, but recieved %v", e, a) - } - if e, a := c.EscapedURI, req.URL.EscapedPath(); e != a { - t.Errorf("expected %v, but recieved %v", e, a) - } - } -} diff --git a/aws/signer/v4/functional_test.go b/aws/signer/v4/functional_test.go index bf93e6a4ee2..0a490487386 100644 --- a/aws/signer/v4/functional_test.go +++ b/aws/signer/v4/functional_test.go @@ -1,6 +1,7 @@ package v4_test import ( + "fmt" "net/http" "net/url" "reflect" @@ -171,3 +172,76 @@ func TestStandaloneSign_CustomURIEscape(t *testing.T) { t.Errorf("expect %v, got %v", e, a) } } + +func TestStandaloneSign(t *testing.T) { + creds := unit.Config().Credentials + signer := v4.NewSigner(creds) + + for _, c := range standaloneSignCases { + host := fmt.Sprintf("https://%s.%s.%s.amazonaws.com", + c.SubDomain, c.Region, c.Service) + + req, err := http.NewRequest("GET", host, nil) + if err != nil { + t.Errorf("expected no error, but received %v", err) + } + + // URL.EscapedPath() will be used by the signer to get the + // escaped form of the request's URI path. + req.URL.Path = c.OrigURI + req.URL.RawQuery = c.OrigQuery + + _, err = signer.Sign(req, nil, c.Service, c.Region, time.Unix(0, 0)) + if err != nil { + t.Errorf("expected no error, but received %v", err) + } + + actual := req.Header.Get("Authorization") + if e, a := c.ExpSig, actual; e != a { + t.Errorf("expected %v, but recieved %v", e, a) + } + if e, a := c.OrigURI, req.URL.Path; e != a { + t.Errorf("expected %v, but recieved %v", e, a) + } + if e, a := c.EscapedURI, req.URL.EscapedPath(); e != a { + t.Errorf("expected %v, but recieved %v", e, a) + } + } +} + +func TestStandaloneSign_RawPath(t *testing.T) { + creds := unit.Config().Credentials + signer := v4.NewSigner(creds) + + for _, c := range standaloneSignCases { + host := fmt.Sprintf("https://%s.%s.%s.amazonaws.com", + c.SubDomain, c.Region, c.Service) + + req, err := http.NewRequest("GET", host, nil) + if err != nil { + t.Errorf("expected no error, but received %v", err) + } + + // URL.EscapedPath() will be used by the signer to get the + // escaped form of the request's URI path. + req.URL.Path = c.OrigURI + req.URL.RawPath = c.EscapedURI + req.URL.RawQuery = c.OrigQuery + + _, err = signer.Sign(req, nil, c.Service, c.Region, time.Unix(0, 0)) + if err != nil { + t.Errorf("expected no error, but received %v", err) + } + + actual := req.Header.Get("Authorization") + if e, a := c.ExpSig, actual; e != a { + t.Errorf("expected %v, but recieved %v", e, a) + } + if e, a := c.OrigURI, req.URL.Path; e != a { + t.Errorf("expected %v, but recieved %v", e, a) + } + if e, a := c.EscapedURI, req.URL.EscapedPath(); e != a { + t.Errorf("expected %v, but recieved %v", e, a) + } + } +} diff --git a/aws/signer/v4/uri_path.go b/aws/signer/v4/uri_path.go index bd082e9d1f7..0574b3d5f7f 100644 --- a/aws/signer/v4/uri_path.go +++ b/aws/signer/v4/uri_path.go @@ -1,5 +1,3 @@ -// +build go1.5 - package v4 import ( diff --git a/aws/stscreds/provider.go b/aws/stscreds/provider.go index 1933007aa8e..ef1b7e71daf 100644 --- a/aws/stscreds/provider.go +++ b/aws/stscreds/provider.go @@ -61,7 +61,7 @@ role's credentials need to be refreshed. The StdinTokenProvider function is available to prompt on stdin to retrieve the MFA token code from the user. You can also implement custom prompts by -satisfing the TokenProvider function signature. +satisfying the TokenProvider function signature. Using StdinTokenProvider with multiple AssumeRoleProviders, or Credentials will have undesirable results as the StdinTokenProvider will not be synchronized. A diff --git a/aws/url.go b/aws/url.go index 6192b2455b6..dbe01d532e3 100644 --- a/aws/url.go +++ b/aws/url.go @@ -1,5 +1,3 @@ -// +build go1.8 - package aws import "net/url" @@ -7,6 +5,7 @@ import "net/url" // URLHostname will extract the Hostname without port from the URL value. // // Wrapper of net/url#URL.Hostname for backwards Go version compatibility. +// Todo: Check if needed for +go1.11 func URLHostname(url *url.URL) string { return url.Hostname() } diff --git a/aws/url_1_7.go b/aws/url_1_7.go deleted file mode 100644 index 0210d2720e7..00000000000 --- a/aws/url_1_7.go +++ /dev/null @@ -1,29 +0,0 @@ -// +build !go1.8 - -package aws - -import ( - "net/url" - "strings" -) - -// URLHostname will extract the Hostname without port from the URL value. -// -// Copy of Go 1.8's net/url#URL.Hostname functionality. -func URLHostname(url *url.URL) string { - return stripPort(url.Host) - -} - -// stripPort is copy of Go 1.8 url#URL.Hostname functionality. -// https://golang.org/src/net/url/url.go -func stripPort(hostport string) string { - colon := strings.IndexByte(hostport, ':') - if colon == -1 { - return hostport - } - if i := strings.IndexByte(hostport, ']'); i != -1 { - return strings.TrimPrefix(hostport[:i], "[") - } - return hostport[:colon] -} diff --git a/example/aws/request/withContext/withContext.go b/example/aws/request/withContext/withContext.go index 6cbed6c0ffa..32b62b33468 100644 --- a/example/aws/request/withContext/withContext.go +++ b/example/aws/request/withContext/withContext.go @@ -1,4 +1,4 @@ -// +build example,go1.7 +// +build example package main diff --git a/internal/awstesting/sandbox/Dockerfile.test.go1.10 b/internal/awstesting/sandbox/Dockerfile.test.go1.10 deleted file mode 100644 index 7cf47942d0d..00000000000 --- a/internal/awstesting/sandbox/Dockerfile.test.go1.10 +++ /dev/null @@ -1,11 +0,0 @@ -FROM ubuntu:12.04 -FROM golang:1.10 - -ADD . /go/src/github.com/aws/aws-sdk-go - -RUN apt-get update && apt-get install -y --no-install-recommends \ - vim \ - && rm -rf /var/list/apt/lists/* - -WORKDIR /go/src/github.com/aws/aws-sdk-go -CMD ["make", "unit"] diff --git a/internal/awstesting/sandbox/Dockerfile.test.go1.9 b/internal/awstesting/sandbox/Dockerfile.test.go1.9 deleted file mode 100644 index 24c9508f2f3..00000000000 --- a/internal/awstesting/sandbox/Dockerfile.test.go1.9 +++ /dev/null @@ -1,11 +0,0 @@ -FROM ubuntu:12.04 -FROM golang:1.9 - -ADD . /go/src/github.com/aws/aws-sdk-go - -RUN apt-get update && apt-get install -y --no-install-recommends \ - vim \ - && rm -rf /var/list/apt/lists/* - -WORKDIR /go/src/github.com/aws/aws-sdk-go -CMD ["make", "unit"] diff --git a/internal/ini/ini_lexer_test.go b/internal/ini/ini_lexer_test.go index f1fb609f6cc..8a9f99529aa 100644 --- a/internal/ini/ini_lexer_test.go +++ b/internal/ini/ini_lexer_test.go @@ -1,5 +1,3 @@ -// +build go1.7 - package ini import ( diff --git a/internal/ini/ini_parser_test.go b/internal/ini/ini_parser_test.go index f6aed3d6c22..275bef5cd2d 100644 --- a/internal/ini/ini_parser_test.go +++ b/internal/ini/ini_parser_test.go @@ -1,5 +1,3 @@ -// +build go1.7 - package ini import ( diff --git a/internal/ini/literal_tokens_test.go b/internal/ini/literal_tokens_test.go index ff4837fde47..e8df2d07640 100644 --- a/internal/ini/literal_tokens_test.go +++ b/internal/ini/literal_tokens_test.go @@ -1,5 +1,3 @@ -// +build go1.7 - package ini import ( diff --git a/internal/ini/number_helper_test.go b/internal/ini/number_helper_test.go index da1c757088c..04b3d109341 100644 --- a/internal/ini/number_helper_test.go +++ b/internal/ini/number_helper_test.go @@ -1,5 +1,3 @@ -// +build go1.7 - package ini import ( diff --git a/internal/ini/op_tokens_test.go b/internal/ini/op_tokens_test.go index 9dfcda0b0c1..b422f6c332a 100644 --- a/internal/ini/op_tokens_test.go +++ b/internal/ini/op_tokens_test.go @@ -1,5 +1,3 @@ -// +build go1.7 - package ini import ( diff --git a/internal/ini/parse_stack_test.go b/internal/ini/parse_stack_test.go index f22c124015b..af3d999989d 100644 --- a/internal/ini/parse_stack_test.go +++ b/internal/ini/parse_stack_test.go @@ -1,5 +1,3 @@ -// +build go1.7 - package ini import ( diff --git a/internal/ini/sep_tokens_test.go b/internal/ini/sep_tokens_test.go index 2b5d68aa6fb..24094c3c966 100644 --- a/internal/ini/sep_tokens_test.go +++ b/internal/ini/sep_tokens_test.go @@ -1,5 +1,3 @@ -// +build go1.7 - package ini import ( diff --git a/internal/ini/skipper_test.go b/internal/ini/skipper_test.go index d070edb0b7c..82f6a712c93 100644 --- a/internal/ini/skipper_test.go +++ b/internal/ini/skipper_test.go @@ -1,5 +1,3 @@ -// +build go1.7 - package ini import ( diff --git a/internal/ini/value_util_test.go b/internal/ini/value_util_test.go index b4c8d15a9d3..f13a8f2d4eb 100644 --- a/internal/ini/value_util_test.go +++ b/internal/ini/value_util_test.go @@ -1,5 +1,3 @@ -// +build go1.7 - package ini import ( diff --git a/internal/ini/walker_test.go b/internal/ini/walker_test.go index 6a70730ecd6..2a1db5310fa 100644 --- a/internal/ini/walker_test.go +++ b/internal/ini/walker_test.go @@ -1,5 +1,3 @@ -// +build go1.7 - package ini import ( @@ -13,7 +11,7 @@ import ( func TestValidDataFiles(t *testing.T) { const expectedFileSuffix = "_expected" - filepath.Walk("./testdata/valid", func(path string, info os.FileInfo, err error) error { + err := filepath.Walk("./testdata/valid", func(path string, info os.FileInfo, err error) error { if strings.HasSuffix(path, expectedFileSuffix) { return nil } @@ -93,6 +91,9 @@ func TestValidDataFiles(t *testing.T) { return nil }) + if err != nil { + t.Errorf("Error while walking the file tree rooted at root, %d", err) + } } func TestInvalidDataFiles(t *testing.T) { diff --git a/internal/sdkmath/floor.go b/internal/sdkmath/floor.go index 44898eed0fd..47064629a46 100644 --- a/internal/sdkmath/floor.go +++ b/internal/sdkmath/floor.go @@ -1,5 +1,3 @@ -// +build go1.10 - package sdkmath import "math" diff --git a/internal/sdkmath/floor_go1.9.go b/internal/sdkmath/floor_go1.9.go deleted file mode 100644 index 6990c82783f..00000000000 --- a/internal/sdkmath/floor_go1.9.go +++ /dev/null @@ -1,56 +0,0 @@ -// +build !go1.10 - -package sdkmath - -import "math" - -// Copied from the Go standard library's (Go 1.12) math/floor.go for use in -// Go version prior to Go 1.10. -const ( - uvone = 0x3FF0000000000000 - mask = 0x7FF - shift = 64 - 11 - 1 - bias = 1023 - signMask = 1 << 63 - fracMask = 1<= 0.5 { - // return t + Copysign(1, x) - // } - // return t - // } - bits := math.Float64bits(x) - e := uint(bits>>shift) & mask - if e < bias { - // Round abs(x) < 1 including denormals. - bits &= signMask // +-0 - if e == bias-1 { - bits |= uvone // +-1 - } - } else if e < bias+shift { - // Round any abs(x) >= 1 containing a fractional component [0,1). - // - // Numbers with larger exponents are returned unchanged since they - // must be either an integer, infinity, or NaN. - const half = 1 << (shift - 1) - e -= bias - bits += half >> e - bits &^= fracMask >> e - } - return math.Float64frombits(bits) -} \ No newline at end of file From 8678fdcff551eca20d3d47f1835cc41f6c3a82e2 Mon Sep 17 00:00:00 2001 From: skotambkar Date: Wed, 18 Sep 2019 18:39:23 -0700 Subject: [PATCH 2/8] removing build tags from private/protocol --- private/protocol/host_prefix_test.go | 2 -- private/protocol/host_test.go | 2 -- private/protocol/protocol_test.go | 13 ++++++------- private/protocol/timestamp_test.go | 2 -- private/protocol/unmarshal.go | 6 +++--- private/protocol/unmarshal_test.go | 6 +++--- 6 files changed, 12 insertions(+), 19 deletions(-) diff --git a/private/protocol/host_prefix_test.go b/private/protocol/host_prefix_test.go index bab2606a27c..72b1f91fc60 100644 --- a/private/protocol/host_prefix_test.go +++ b/private/protocol/host_prefix_test.go @@ -1,5 +1,3 @@ -// +build go1.7 - package protocol import ( diff --git a/private/protocol/host_test.go b/private/protocol/host_test.go index 11ea9b4fa18..1c033737b7f 100644 --- a/private/protocol/host_test.go +++ b/private/protocol/host_test.go @@ -1,5 +1,3 @@ -// +build go1.7 - package protocol import ( diff --git a/private/protocol/protocol_test.go b/private/protocol/protocol_test.go index a8bc325a07c..54021557a2c 100644 --- a/private/protocol/protocol_test.go +++ b/private/protocol/protocol_test.go @@ -5,8 +5,7 @@ import ( "net/url" "testing" - metadata "github.com/aws/aws-sdk-go-v2/aws" - request "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awstesting" "github.com/aws/aws-sdk-go-v2/private/protocol" "github.com/aws/aws-sdk-go-v2/private/protocol/ec2query" @@ -37,12 +36,12 @@ func jsonData(set bool, b []byte, size, delta int) { } } -func buildNewRequest(data interface{}) *request.Request { +func buildNewRequest(data interface{}) *aws.Request { v := url.Values{} v.Set("test", "TEST") v.Add("test1", "TEST1") - req := &request.Request{ + req := &aws.Request{ HTTPRequest: &http.Request{ Header: make(http.Header), Body: &awstesting.ReadCloser{Size: 2048}, @@ -55,7 +54,7 @@ func buildNewRequest(data interface{}) *request.Request { }{ "Test", }, - Metadata: metadata.Metadata{ + Metadata: aws.Metadata{ ServiceName: "test", TargetPrefix: "test", JSONVersion: "test", @@ -64,7 +63,7 @@ func buildNewRequest(data interface{}) *request.Request { SigningName: "test", SigningRegion: "test", }, - Operation: &request.Operation{ + Operation: &aws.Operation{ Name: "test", }, } @@ -102,7 +101,7 @@ const ( xmlType ) -func checkForLeak(data interface{}, build, fn func(*request.Request), t *testing.T, result expected) { +func checkForLeak(data interface{}, build, fn func(*aws.Request), t *testing.T, result expected) { req := buildNewRequest(data) reader := req.HTTPResponse.Body.(*awstesting.ReadCloser) switch result.dataType { diff --git a/private/protocol/timestamp_test.go b/private/protocol/timestamp_test.go index 799014fdbdd..de1f4f47487 100644 --- a/private/protocol/timestamp_test.go +++ b/private/protocol/timestamp_test.go @@ -1,5 +1,3 @@ -// +build go1.7 - package protocol import ( diff --git a/private/protocol/unmarshal.go b/private/protocol/unmarshal.go index de0483489a6..31ceb603ade 100644 --- a/private/protocol/unmarshal.go +++ b/private/protocol/unmarshal.go @@ -4,14 +4,14 @@ import ( "io" "io/ioutil" - request "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/aws" ) // UnmarshalDiscardBodyHandler is a named request handler to empty and close a response's body -var UnmarshalDiscardBodyHandler = request.NamedHandler{Name: "awssdk.shared.UnmarshalDiscardBody", Fn: UnmarshalDiscardBody} +var UnmarshalDiscardBodyHandler = aws.NamedHandler{Name: "awssdk.shared.UnmarshalDiscardBody", Fn: UnmarshalDiscardBody} // UnmarshalDiscardBody is a request handler to empty a response's body and closing it. -func UnmarshalDiscardBody(r *request.Request) { +func UnmarshalDiscardBody(r *aws.Request) { if r.HTTPResponse == nil || r.HTTPResponse.Body == nil { return } diff --git a/private/protocol/unmarshal_test.go b/private/protocol/unmarshal_test.go index 9bf88d054fe..6938065e411 100644 --- a/private/protocol/unmarshal_test.go +++ b/private/protocol/unmarshal_test.go @@ -5,7 +5,7 @@ import ( "strings" "testing" - request "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/private/protocol" ) @@ -21,7 +21,7 @@ func (m *mockCloser) Close() error { func TestUnmarshalDrainBody(t *testing.T) { b := &mockCloser{Reader: strings.NewReader("example body")} - r := &request.Request{HTTPResponse: &http.Response{ + r := &aws.Request{HTTPResponse: &http.Response{ Body: b, }} @@ -38,7 +38,7 @@ func TestUnmarshalDrainBody(t *testing.T) { } func TestUnmarshalDrainBodyNoBody(t *testing.T) { - r := &request.Request{HTTPResponse: &http.Response{}} + r := &aws.Request{HTTPResponse: &http.Response{}} protocol.UnmarshalDiscardBody(r) if r.Error != nil { From 7e84336c54a649fd2a15486dc157efae311c7acc Mon Sep 17 00:00:00 2001 From: skotambkar Date: Wed, 18 Sep 2019 18:49:05 -0700 Subject: [PATCH 3/8] removed build tag from services --- private/model/api/api_test.go | 2 +- private/model/api/load_test.go | 2 +- private/model/api/passes_test.go | 2 +- private/model/api/shapetag_test.go | 2 +- private/model/cli/gen-api/main.go | 2 +- service/acm/api_integ_test.go | 2 +- service/apigateway/api_integ_test.go | 2 +- service/applicationautoscaling/api_integ_test.go | 2 +- service/applicationdiscoveryservice/api_integ_test.go | 2 +- service/appstream/api_integ_test.go | 2 +- service/athena/api_integ_test.go | 2 +- service/autoscaling/api_integ_test.go | 2 +- service/batch/api_integ_test.go | 2 +- service/cloudfront/api_integ_test.go | 2 +- service/cloudhsmv2/api_integ_test.go | 2 +- service/cloudtrail/api_integ_test.go | 2 +- service/cloudwatch/api_integ_test.go | 2 +- service/cloudwatchevents/api_integ_test.go | 2 +- service/cloudwatchlogs/api_integ_test.go | 2 +- service/codebuild/api_integ_test.go | 2 +- service/codecommit/api_integ_test.go | 2 +- service/codedeploy/api_integ_test.go | 2 +- service/codepipeline/api_integ_test.go | 2 +- service/codestar/api_integ_test.go | 2 +- service/cognitoidentityprovider/api_integ_test.go | 2 +- service/configservice/api_integ_test.go | 2 +- service/costandusagereportservice/api_integ_test.go | 2 +- service/databasemigrationservice/api_integ_test.go | 2 +- service/devicefarm/api_integ_test.go | 2 +- service/directconnect/api_integ_test.go | 2 +- service/directoryservice/api_integ_test.go | 2 +- service/docdb/api_integ_test.go | 2 +- service/dynamodb/api_integ_test.go | 2 +- service/ec2/api_integ_test.go | 2 +- service/ecr/api_integ_test.go | 2 +- service/ecs/api_integ_test.go | 2 +- service/efs/api_integ_test.go | 2 +- service/elasticache/api_integ_test.go | 2 +- service/elasticbeanstalk/api_integ_test.go | 2 +- service/elasticloadbalancing/api_integ_test.go | 2 +- service/elasticloadbalancingv2/api_integ_test.go | 2 +- service/elasticsearchservice/api_integ_test.go | 2 +- service/elastictranscoder/api_integ_test.go | 2 +- service/emr/api_integ_test.go | 2 +- service/eventbridge/api_integ_test.go | 2 +- service/firehose/api_integ_test.go | 2 +- service/gamelift/api_integ_test.go | 2 +- service/glacier/api_integ_test.go | 2 +- service/glue/api_integ_test.go | 2 +- service/health/api_integ_test.go | 2 +- service/iam/api_integ_test.go | 2 +- service/inspector/api_integ_test.go | 2 +- service/iot/api_integ_test.go | 2 +- service/kinesis/api_integ_test.go | 2 +- service/kms/api_integ_test.go | 2 +- service/lambda/api_integ_test.go | 2 +- service/lightsail/api_integ_test.go | 2 +- service/neptune/api_integ_test.go | 2 +- service/opsworks/api_integ_test.go | 2 +- service/pinpointemail/api_integ_test.go | 2 +- service/polly/api_integ_test.go | 2 +- service/rds/api_integ_test.go | 2 +- service/redshift/api_integ_test.go | 2 +- service/rekognition/api_integ_test.go | 2 +- service/route53/api_integ_test.go | 2 +- service/route53resolver/api_integ_test.go | 2 +- service/s3/api_integ_test.go | 2 +- service/secretsmanager/api_integ_test.go | 2 +- service/servicecatalog/api_integ_test.go | 2 +- service/ses/api_integ_test.go | 2 +- service/sfn/api_integ_test.go | 2 +- service/shield/api_integ_test.go | 2 +- service/sms/api_integ_test.go | 2 +- service/snowball/api_integ_test.go | 2 +- service/sns/api_integ_test.go | 2 +- service/sqs/api_integ_test.go | 2 +- service/ssm/api_integ_test.go | 2 +- service/sts/api_integ_test.go | 2 +- service/waf/api_integ_test.go | 2 +- service/wafregional/api_integ_test.go | 2 +- service/workspaces/api_integ_test.go | 2 +- 81 files changed, 81 insertions(+), 81 deletions(-) diff --git a/private/model/api/api_test.go b/private/model/api/api_test.go index 08a6a6f98ad..f7a52f46bec 100644 --- a/private/model/api/api_test.go +++ b/private/model/api/api_test.go @@ -1,4 +1,4 @@ -// +build go1.8,codegen +// +build codegen package api diff --git a/private/model/api/load_test.go b/private/model/api/load_test.go index db4d8b3076c..b84f1191aba 100644 --- a/private/model/api/load_test.go +++ b/private/model/api/load_test.go @@ -1,4 +1,4 @@ -// +build 1.6,codegen +// +build codegen package api diff --git a/private/model/api/passes_test.go b/private/model/api/passes_test.go index af8a9d02aa1..19abb1bac54 100644 --- a/private/model/api/passes_test.go +++ b/private/model/api/passes_test.go @@ -1,4 +1,4 @@ -// +build go1.8,codegen +// +build codegen package api diff --git a/private/model/api/shapetag_test.go b/private/model/api/shapetag_test.go index a065e3160a1..f3f95cda7c8 100644 --- a/private/model/api/shapetag_test.go +++ b/private/model/api/shapetag_test.go @@ -1,4 +1,4 @@ -// +build 1.6,codegen +// +build codegen package api_test diff --git a/private/model/cli/gen-api/main.go b/private/model/cli/gen-api/main.go index de4708cf64b..32f32db9b42 100644 --- a/private/model/cli/gen-api/main.go +++ b/private/model/cli/gen-api/main.go @@ -316,7 +316,7 @@ func writeS3ManagerUploadInputFile(g *generateInfo) error { func writeAPISmokeTestsFile(g *generateInfo) error { return writeGoFile(filepath.Join(g.PackageDir, "api_integ_test.go"), codeLayout, - "// +build go1.10,integration\n", + "// +build integration\n", g.API.PackageName()+"_test", g.API.APISmokeTestsGoCode(), ) diff --git a/service/acm/api_integ_test.go b/service/acm/api_integ_test.go index aa7a650dff8..8ccdd12c597 100644 --- a/service/acm/api_integ_test.go +++ b/service/acm/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package acm_test diff --git a/service/apigateway/api_integ_test.go b/service/apigateway/api_integ_test.go index 9f353a5fba6..4472d3f0b22 100644 --- a/service/apigateway/api_integ_test.go +++ b/service/apigateway/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package apigateway_test diff --git a/service/applicationautoscaling/api_integ_test.go b/service/applicationautoscaling/api_integ_test.go index 2d6dc415842..6812dacc5d1 100644 --- a/service/applicationautoscaling/api_integ_test.go +++ b/service/applicationautoscaling/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package applicationautoscaling_test diff --git a/service/applicationdiscoveryservice/api_integ_test.go b/service/applicationdiscoveryservice/api_integ_test.go index 7f94e852faf..5a92e6917e3 100644 --- a/service/applicationdiscoveryservice/api_integ_test.go +++ b/service/applicationdiscoveryservice/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package applicationdiscoveryservice_test diff --git a/service/appstream/api_integ_test.go b/service/appstream/api_integ_test.go index f37d09f5df1..b9de1fa02c3 100644 --- a/service/appstream/api_integ_test.go +++ b/service/appstream/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package appstream_test diff --git a/service/athena/api_integ_test.go b/service/athena/api_integ_test.go index fd77b224bc6..2becc395756 100644 --- a/service/athena/api_integ_test.go +++ b/service/athena/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package athena_test diff --git a/service/autoscaling/api_integ_test.go b/service/autoscaling/api_integ_test.go index bee2e8661f6..402cdfc0483 100644 --- a/service/autoscaling/api_integ_test.go +++ b/service/autoscaling/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package autoscaling_test diff --git a/service/batch/api_integ_test.go b/service/batch/api_integ_test.go index 412c2f5c259..4c1a5ce0662 100644 --- a/service/batch/api_integ_test.go +++ b/service/batch/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package batch_test diff --git a/service/cloudfront/api_integ_test.go b/service/cloudfront/api_integ_test.go index 47236706843..7abc297ddab 100644 --- a/service/cloudfront/api_integ_test.go +++ b/service/cloudfront/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package cloudfront_test diff --git a/service/cloudhsmv2/api_integ_test.go b/service/cloudhsmv2/api_integ_test.go index 6a26ec54c22..b18acdd1ec2 100644 --- a/service/cloudhsmv2/api_integ_test.go +++ b/service/cloudhsmv2/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package cloudhsmv2_test diff --git a/service/cloudtrail/api_integ_test.go b/service/cloudtrail/api_integ_test.go index 597b8a8dc47..b63b0f46826 100644 --- a/service/cloudtrail/api_integ_test.go +++ b/service/cloudtrail/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package cloudtrail_test diff --git a/service/cloudwatch/api_integ_test.go b/service/cloudwatch/api_integ_test.go index 108ada4e7dd..f0df0b72772 100644 --- a/service/cloudwatch/api_integ_test.go +++ b/service/cloudwatch/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package cloudwatch_test diff --git a/service/cloudwatchevents/api_integ_test.go b/service/cloudwatchevents/api_integ_test.go index 361dcedbf23..9a4d2f14f1a 100644 --- a/service/cloudwatchevents/api_integ_test.go +++ b/service/cloudwatchevents/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package cloudwatchevents_test diff --git a/service/cloudwatchlogs/api_integ_test.go b/service/cloudwatchlogs/api_integ_test.go index 13e393d2d95..6de8ea048b8 100644 --- a/service/cloudwatchlogs/api_integ_test.go +++ b/service/cloudwatchlogs/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package cloudwatchlogs_test diff --git a/service/codebuild/api_integ_test.go b/service/codebuild/api_integ_test.go index 3c76365b58c..fdc8e136d88 100644 --- a/service/codebuild/api_integ_test.go +++ b/service/codebuild/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package codebuild_test diff --git a/service/codecommit/api_integ_test.go b/service/codecommit/api_integ_test.go index c875ab565d5..26c9658e93a 100644 --- a/service/codecommit/api_integ_test.go +++ b/service/codecommit/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package codecommit_test diff --git a/service/codedeploy/api_integ_test.go b/service/codedeploy/api_integ_test.go index 7ff701c4d9b..1e78eb76089 100644 --- a/service/codedeploy/api_integ_test.go +++ b/service/codedeploy/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package codedeploy_test diff --git a/service/codepipeline/api_integ_test.go b/service/codepipeline/api_integ_test.go index 608a5970bfe..89c3077bd5b 100644 --- a/service/codepipeline/api_integ_test.go +++ b/service/codepipeline/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package codepipeline_test diff --git a/service/codestar/api_integ_test.go b/service/codestar/api_integ_test.go index 61590b478eb..fbbce3c810e 100644 --- a/service/codestar/api_integ_test.go +++ b/service/codestar/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package codestar_test diff --git a/service/cognitoidentityprovider/api_integ_test.go b/service/cognitoidentityprovider/api_integ_test.go index 881a8e21e35..e7aff832159 100644 --- a/service/cognitoidentityprovider/api_integ_test.go +++ b/service/cognitoidentityprovider/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package cognitoidentityprovider_test diff --git a/service/configservice/api_integ_test.go b/service/configservice/api_integ_test.go index d826fb703da..343e56d95a5 100644 --- a/service/configservice/api_integ_test.go +++ b/service/configservice/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package configservice_test diff --git a/service/costandusagereportservice/api_integ_test.go b/service/costandusagereportservice/api_integ_test.go index 821b41e4c4e..3665cf12da2 100644 --- a/service/costandusagereportservice/api_integ_test.go +++ b/service/costandusagereportservice/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package costandusagereportservice_test diff --git a/service/databasemigrationservice/api_integ_test.go b/service/databasemigrationservice/api_integ_test.go index 1fd4e6e197b..779048059d1 100644 --- a/service/databasemigrationservice/api_integ_test.go +++ b/service/databasemigrationservice/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package databasemigrationservice_test diff --git a/service/devicefarm/api_integ_test.go b/service/devicefarm/api_integ_test.go index e8ca55be4a4..131c5ed19d0 100644 --- a/service/devicefarm/api_integ_test.go +++ b/service/devicefarm/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package devicefarm_test diff --git a/service/directconnect/api_integ_test.go b/service/directconnect/api_integ_test.go index 10e547a1571..e7fed65c809 100644 --- a/service/directconnect/api_integ_test.go +++ b/service/directconnect/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package directconnect_test diff --git a/service/directoryservice/api_integ_test.go b/service/directoryservice/api_integ_test.go index e9176f53cec..631b875edf3 100644 --- a/service/directoryservice/api_integ_test.go +++ b/service/directoryservice/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package directoryservice_test diff --git a/service/docdb/api_integ_test.go b/service/docdb/api_integ_test.go index 638e474da84..78c8159db6e 100644 --- a/service/docdb/api_integ_test.go +++ b/service/docdb/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package docdb_test diff --git a/service/dynamodb/api_integ_test.go b/service/dynamodb/api_integ_test.go index 55e441e6ba2..6de29a1bd56 100644 --- a/service/dynamodb/api_integ_test.go +++ b/service/dynamodb/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package dynamodb_test diff --git a/service/ec2/api_integ_test.go b/service/ec2/api_integ_test.go index 3050c50f602..6cf83498ed1 100644 --- a/service/ec2/api_integ_test.go +++ b/service/ec2/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package ec2_test diff --git a/service/ecr/api_integ_test.go b/service/ecr/api_integ_test.go index d36f09167f0..5f07ef49326 100644 --- a/service/ecr/api_integ_test.go +++ b/service/ecr/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package ecr_test diff --git a/service/ecs/api_integ_test.go b/service/ecs/api_integ_test.go index 44bac34cc9f..04976a64bf8 100644 --- a/service/ecs/api_integ_test.go +++ b/service/ecs/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package ecs_test diff --git a/service/efs/api_integ_test.go b/service/efs/api_integ_test.go index 125f4311265..11a5c91ee8e 100644 --- a/service/efs/api_integ_test.go +++ b/service/efs/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package efs_test diff --git a/service/elasticache/api_integ_test.go b/service/elasticache/api_integ_test.go index e27669092b0..d002b489d6c 100644 --- a/service/elasticache/api_integ_test.go +++ b/service/elasticache/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package elasticache_test diff --git a/service/elasticbeanstalk/api_integ_test.go b/service/elasticbeanstalk/api_integ_test.go index ab42d4f7f8e..023953c2116 100644 --- a/service/elasticbeanstalk/api_integ_test.go +++ b/service/elasticbeanstalk/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package elasticbeanstalk_test diff --git a/service/elasticloadbalancing/api_integ_test.go b/service/elasticloadbalancing/api_integ_test.go index fc6f2f2090e..aa46c4036de 100644 --- a/service/elasticloadbalancing/api_integ_test.go +++ b/service/elasticloadbalancing/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package elasticloadbalancing_test diff --git a/service/elasticloadbalancingv2/api_integ_test.go b/service/elasticloadbalancingv2/api_integ_test.go index 93d8804848e..f06951c2629 100644 --- a/service/elasticloadbalancingv2/api_integ_test.go +++ b/service/elasticloadbalancingv2/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package elasticloadbalancingv2_test diff --git a/service/elasticsearchservice/api_integ_test.go b/service/elasticsearchservice/api_integ_test.go index aad9714986e..8c0fd341456 100644 --- a/service/elasticsearchservice/api_integ_test.go +++ b/service/elasticsearchservice/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package elasticsearchservice_test diff --git a/service/elastictranscoder/api_integ_test.go b/service/elastictranscoder/api_integ_test.go index 7b25c5cf292..fa7eaa4e5c7 100644 --- a/service/elastictranscoder/api_integ_test.go +++ b/service/elastictranscoder/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package elastictranscoder_test diff --git a/service/emr/api_integ_test.go b/service/emr/api_integ_test.go index 55461d46ea3..c5d9adcac9e 100644 --- a/service/emr/api_integ_test.go +++ b/service/emr/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package emr_test diff --git a/service/eventbridge/api_integ_test.go b/service/eventbridge/api_integ_test.go index 28e20e5348a..e3207e06820 100644 --- a/service/eventbridge/api_integ_test.go +++ b/service/eventbridge/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package eventbridge_test diff --git a/service/firehose/api_integ_test.go b/service/firehose/api_integ_test.go index bfb34b8bbbe..0cbd5cc4376 100644 --- a/service/firehose/api_integ_test.go +++ b/service/firehose/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package firehose_test diff --git a/service/gamelift/api_integ_test.go b/service/gamelift/api_integ_test.go index f416e6989ed..66ceb45db71 100644 --- a/service/gamelift/api_integ_test.go +++ b/service/gamelift/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package gamelift_test diff --git a/service/glacier/api_integ_test.go b/service/glacier/api_integ_test.go index 7cf9fd24dc0..5199e9c99f7 100644 --- a/service/glacier/api_integ_test.go +++ b/service/glacier/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package glacier_test diff --git a/service/glue/api_integ_test.go b/service/glue/api_integ_test.go index 4cc49b30f7d..92fd8847b3b 100644 --- a/service/glue/api_integ_test.go +++ b/service/glue/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package glue_test diff --git a/service/health/api_integ_test.go b/service/health/api_integ_test.go index b8b6f27d9de..dc979120ee1 100644 --- a/service/health/api_integ_test.go +++ b/service/health/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package health_test diff --git a/service/iam/api_integ_test.go b/service/iam/api_integ_test.go index e560c212084..91282d34658 100644 --- a/service/iam/api_integ_test.go +++ b/service/iam/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package iam_test diff --git a/service/inspector/api_integ_test.go b/service/inspector/api_integ_test.go index cb5b5f3229c..5af8ae6d5f7 100644 --- a/service/inspector/api_integ_test.go +++ b/service/inspector/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package inspector_test diff --git a/service/iot/api_integ_test.go b/service/iot/api_integ_test.go index 3091e7aa7d6..31ddbe3ca0c 100644 --- a/service/iot/api_integ_test.go +++ b/service/iot/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package iot_test diff --git a/service/kinesis/api_integ_test.go b/service/kinesis/api_integ_test.go index 3db1f28fff1..7ddb65c8a5b 100644 --- a/service/kinesis/api_integ_test.go +++ b/service/kinesis/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package kinesis_test diff --git a/service/kms/api_integ_test.go b/service/kms/api_integ_test.go index 19bad1d0d99..5c080fb4a0b 100644 --- a/service/kms/api_integ_test.go +++ b/service/kms/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package kms_test diff --git a/service/lambda/api_integ_test.go b/service/lambda/api_integ_test.go index 31fa1ca4a98..6342a70e58c 100644 --- a/service/lambda/api_integ_test.go +++ b/service/lambda/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package lambda_test diff --git a/service/lightsail/api_integ_test.go b/service/lightsail/api_integ_test.go index 9d99758d799..4eefbab7a5e 100644 --- a/service/lightsail/api_integ_test.go +++ b/service/lightsail/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package lightsail_test diff --git a/service/neptune/api_integ_test.go b/service/neptune/api_integ_test.go index 8af453cb134..64733646646 100644 --- a/service/neptune/api_integ_test.go +++ b/service/neptune/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package neptune_test diff --git a/service/opsworks/api_integ_test.go b/service/opsworks/api_integ_test.go index 8deaf7e9570..7f87b5f07c3 100644 --- a/service/opsworks/api_integ_test.go +++ b/service/opsworks/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package opsworks_test diff --git a/service/pinpointemail/api_integ_test.go b/service/pinpointemail/api_integ_test.go index 15ee377605e..981a5f13541 100644 --- a/service/pinpointemail/api_integ_test.go +++ b/service/pinpointemail/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package pinpointemail_test diff --git a/service/polly/api_integ_test.go b/service/polly/api_integ_test.go index 0c095b7c235..7ec3d7c9cdf 100644 --- a/service/polly/api_integ_test.go +++ b/service/polly/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package polly_test diff --git a/service/rds/api_integ_test.go b/service/rds/api_integ_test.go index fae92769b0c..d460d28b944 100644 --- a/service/rds/api_integ_test.go +++ b/service/rds/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package rds_test diff --git a/service/redshift/api_integ_test.go b/service/redshift/api_integ_test.go index aad99b3c41c..b2d4a51b74d 100644 --- a/service/redshift/api_integ_test.go +++ b/service/redshift/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package redshift_test diff --git a/service/rekognition/api_integ_test.go b/service/rekognition/api_integ_test.go index ad619305654..ae5232d60a1 100644 --- a/service/rekognition/api_integ_test.go +++ b/service/rekognition/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package rekognition_test diff --git a/service/route53/api_integ_test.go b/service/route53/api_integ_test.go index 110478adfc4..769a52f75b2 100644 --- a/service/route53/api_integ_test.go +++ b/service/route53/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package route53_test diff --git a/service/route53resolver/api_integ_test.go b/service/route53resolver/api_integ_test.go index 1b2dc7be821..d2fef9dc8b5 100644 --- a/service/route53resolver/api_integ_test.go +++ b/service/route53resolver/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package route53resolver_test diff --git a/service/s3/api_integ_test.go b/service/s3/api_integ_test.go index cdbad07d20b..9588a47b107 100644 --- a/service/s3/api_integ_test.go +++ b/service/s3/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package s3_test diff --git a/service/secretsmanager/api_integ_test.go b/service/secretsmanager/api_integ_test.go index 6433f40a708..f76c40d2dd5 100644 --- a/service/secretsmanager/api_integ_test.go +++ b/service/secretsmanager/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package secretsmanager_test diff --git a/service/servicecatalog/api_integ_test.go b/service/servicecatalog/api_integ_test.go index 047544b225e..faaf44da29f 100644 --- a/service/servicecatalog/api_integ_test.go +++ b/service/servicecatalog/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package servicecatalog_test diff --git a/service/ses/api_integ_test.go b/service/ses/api_integ_test.go index 77b5ed0c790..b5d0d7e7823 100644 --- a/service/ses/api_integ_test.go +++ b/service/ses/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package ses_test diff --git a/service/sfn/api_integ_test.go b/service/sfn/api_integ_test.go index 9ca89626ed2..ba9114a6ff7 100644 --- a/service/sfn/api_integ_test.go +++ b/service/sfn/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package sfn_test diff --git a/service/shield/api_integ_test.go b/service/shield/api_integ_test.go index eb63a32b999..e46f72503c6 100644 --- a/service/shield/api_integ_test.go +++ b/service/shield/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package shield_test diff --git a/service/sms/api_integ_test.go b/service/sms/api_integ_test.go index ed39ee06c1b..0957840f085 100644 --- a/service/sms/api_integ_test.go +++ b/service/sms/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package sms_test diff --git a/service/snowball/api_integ_test.go b/service/snowball/api_integ_test.go index 6ed9e106ae1..554c6bd857a 100644 --- a/service/snowball/api_integ_test.go +++ b/service/snowball/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package snowball_test diff --git a/service/sns/api_integ_test.go b/service/sns/api_integ_test.go index 7e867c7eabf..3cf0ef4f544 100644 --- a/service/sns/api_integ_test.go +++ b/service/sns/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package sns_test diff --git a/service/sqs/api_integ_test.go b/service/sqs/api_integ_test.go index 72c3dda07de..af60e9f9301 100644 --- a/service/sqs/api_integ_test.go +++ b/service/sqs/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package sqs_test diff --git a/service/ssm/api_integ_test.go b/service/ssm/api_integ_test.go index 90b0059ba14..1d0e95495ad 100644 --- a/service/ssm/api_integ_test.go +++ b/service/ssm/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package ssm_test diff --git a/service/sts/api_integ_test.go b/service/sts/api_integ_test.go index 842957d9ea7..40b5a26ac3b 100644 --- a/service/sts/api_integ_test.go +++ b/service/sts/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package sts_test diff --git a/service/waf/api_integ_test.go b/service/waf/api_integ_test.go index eaa5fc220a8..b12895dd367 100644 --- a/service/waf/api_integ_test.go +++ b/service/waf/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package waf_test diff --git a/service/wafregional/api_integ_test.go b/service/wafregional/api_integ_test.go index 1b2436aee19..68b09dda3b4 100644 --- a/service/wafregional/api_integ_test.go +++ b/service/wafregional/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package wafregional_test diff --git a/service/workspaces/api_integ_test.go b/service/workspaces/api_integ_test.go index 06796e1ed7d..e4f0a1d924c 100644 --- a/service/workspaces/api_integ_test.go +++ b/service/workspaces/api_integ_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.10,integration +// +build integration package workspaces_test From aa599361dc994664c4149f1204834baeb1c869ca Mon Sep 17 00:00:00 2001 From: skotambkar Date: Thu, 19 Sep 2019 16:02:03 -0700 Subject: [PATCH 4/8] Fixes broken test for code generation --- Makefile | 1 + private/model/api/example_test.go | 27 +++++++++++++++++---------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index c9713af51da..410f11c93c2 100644 --- a/Makefile +++ b/Makefile @@ -155,6 +155,7 @@ get-deps: get-deps-tests get-deps-x-tests get-deps-codegen get-deps-verify get-deps-tests: @echo "go get SDK testing dependencies" go get golang.org/x/net/html + go get github.com/google/go-cmp get-deps-x-tests: @echo "go get SDK testing golang.org/x dependencies" diff --git a/private/model/api/example_test.go b/private/model/api/example_test.go index a7a3b7cf431..6ade182329d 100644 --- a/private/model/api/example_test.go +++ b/private/model/api/example_test.go @@ -1,9 +1,10 @@ -// +build 1.6,codegen +// +build codegen package api import ( "encoding/json" + "github.com/google/go-cmp/cmp" "testing" ) @@ -56,7 +57,7 @@ func buildAPI() *API { } outputRef := ShapeRef{ API: a, - ShapeName: "Foooutput", + ShapeName: "FooOutput", Shape: output, } @@ -74,11 +75,15 @@ func buildAPI() *API { a.Shapes = map[string]*Shape{ "FooInput": input, "FooOutput": output, + "string": stringShape, + "int": intShape, } a.Metadata = Metadata{ ServiceAbbreviation: "FooService", } + a.BaseImportPath = "github.com/aws/aws-sdk-go-v2/service/" + a.Setup() return a } @@ -121,16 +126,19 @@ func TestExampleGeneration(t *testing.T) { expected := ` import ( "fmt" - "bytes" + "context" + "strings" "time" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/awserr" + "github.com/aws/aws-sdk-go-v2/aws/external" "github.com/aws/aws-sdk-go-v2/service/fooservice" + ) var _ time.Duration -var _ bytes.Buffer +var _ strings.Reader var _ aws.Config func parseTime(layout, value string) *time.Time { @@ -144,7 +152,7 @@ func parseTime(layout, value string) *time.Time { // I pity the foo // // Foo bar baz qux -func ExampleFooService_Foo_shared00() { +func ExampleClient_FooRequest_shared00() { cfg, err := external.LoadDefaultAWSConfig() if err != nil { panic("failed to load config, " + err.Error()) @@ -155,7 +163,8 @@ func ExampleFooService_Foo_shared00() { BarShape: aws.String("Hello world"), } - result, err := svc.Foo(input) + req := svc.FooRequest(input) + result, err := req.Send(context.Background()) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { @@ -173,10 +182,8 @@ func ExampleFooService_Foo_shared00() { fmt.Println(result) } ` - if expected != a.ExamplesGoCode() { - t.Log([]byte(expected)) - t.Log([]byte(a.ExamplesGoCode())) - t.Errorf("Expected:\n%s\nReceived:\n%s\n", expected, a.ExamplesGoCode()) + if v := cmp.Diff(expected, a.ExamplesGoCode()); len(v) != 0 { + t.Errorf(v) } } From ad42b266f4a2fdacddd734c95322076f0a869272 Mon Sep 17 00:00:00 2001 From: skotambkar Date: Thu, 19 Sep 2019 16:24:05 -0700 Subject: [PATCH 5/8] removes URLHostname helper --- aws/external/local.go | 1 - aws/url.go | 11 ----------- 2 files changed, 12 deletions(-) delete mode 100644 aws/url.go diff --git a/aws/external/local.go b/aws/external/local.go index 0564fb746b4..62bf66d2466 100644 --- a/aws/external/local.go +++ b/aws/external/local.go @@ -38,7 +38,6 @@ func validateLocalURL(v string) error { return err } - // Todo: remove url.go if this works for +go1.11 host := u.Hostname() if len(host) == 0 { return fmt.Errorf("unable to parse host from local HTTP cred provider URL") diff --git a/aws/url.go b/aws/url.go deleted file mode 100644 index dbe01d532e3..00000000000 --- a/aws/url.go +++ /dev/null @@ -1,11 +0,0 @@ -package aws - -import "net/url" - -// URLHostname will extract the Hostname without port from the URL value. -// -// Wrapper of net/url#URL.Hostname for backwards Go version compatibility. -// Todo: Check if needed for +go1.11 -func URLHostname(url *url.URL) string { - return url.Hostname() -} From 77b3ec64d8b814ea6d0df2e99f3d11119a49c8d3 Mon Sep 17 00:00:00 2001 From: skotambkar Date: Thu, 19 Sep 2019 17:21:09 -0700 Subject: [PATCH 6/8] Updated changelog entry --- CHANGELOG_PENDING.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 75735d4540c..3ad29ef79f3 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -5,12 +5,16 @@ Deprecations --- * `aws`: Removes plugin credential provider ([#391](https://github.com/aws/aws-sdk-go-v2/pull/391)) * Removing plugin credential provider from the v2 SDK developer preview. This feature may be made available as a separate module. +* Removes support for deprecated Go versions ([#393](https://github.com/aws/aws-sdk-go-v2/pull/393)) + * Removes support for Go version specific files from the SDK. Also removes irrelevant build tags, and updates the README.md file. SDK Features --- SDK Enhancements --- +* `aws/request` : Retryer is now a named field on Request. ([#393](https://github.com/aws/aws-sdk-go-v2/pull/393)) SDK Bugs --- +* `private/model/api`: Fixes broken test for code generation. ([#393](https://github.com/aws/aws-sdk-go-v2/pull/393)) From 581e328034e99213ae101f5906a9aff3ac20793f Mon Sep 17 00:00:00 2001 From: skotambkar Date: Fri, 20 Sep 2019 11:49:42 -0700 Subject: [PATCH 7/8] Adds suggested changes --- README.md | 2 +- aws/defaults/handlers.go | 7 ++----- aws/request.go | 13 +++++++++++++ aws/retryer.go | 3 +-- internal/ini/walker_test.go | 2 +- internal/sdkmath/floor.go | 13 ------------- private/protocol/timestamp.go | 4 +--- 7 files changed, 19 insertions(+), 25 deletions(-) delete mode 100644 internal/sdkmath/floor.go diff --git a/README.md b/README.md index d744329119a..388efa55d5c 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ `aws-sdk-go-v2` is the **Developer Preview** for the v2 AWS SDK for the Go programming language. While in Developer Preview (aka **beta**) the SDK may release minor version changes that break backwards compatability. The release notes for the breaking change will include information about the breaking change, and how you can migrate to the latest version. -Check out the [Issues] and [Projects] for design and updates being made to the SDK. The v2 SDK requires a minimum version of Go 1.11. +Check out the [Issues] and [Projects] for design and updates being made to the SDK. The v2 SDK requires a minimum version of `Go 1.11`. We'll be expanding out the [Issues] and [Projects] sections with additional changes to the SDK based on your feedback, and SDK's core's improvements. Check the the SDK's [CHANGE_LOG] for information about the latest updates to the SDK. diff --git a/aws/defaults/handlers.go b/aws/defaults/handlers.go index 272be2917f9..238a747f72f 100644 --- a/aws/defaults/handlers.go +++ b/aws/defaults/handlers.go @@ -187,11 +187,8 @@ var ValidateResponseHandler = aws.NamedHandler{Name: "core.ValidateResponseHandl var AfterRetryHandler = aws.NamedHandler{ Name: "core.AfterRetryHandler", Fn: func(r *aws.Request) { - // If one of the other handlers already set the retry state - // we don't want to override it based on the service's state - if r.Retryable == nil { - r.Retryable = aws.Bool(r.Retryer.ShouldRetry(r)) - } + // set retry state based on the service's state + r.Retryable = aws.Bool(r.Retryer.ShouldRetry(r)) if r.WillRetry() { r.RetryDelay = r.Retryer.RetryRules(r) diff --git a/aws/request.go b/aws/request.go index 85d7c0ab94f..3f2e3249304 100644 --- a/aws/request.go +++ b/aws/request.go @@ -383,6 +383,19 @@ func (r *Request) getNextRequestBody() (body io.ReadCloser, err error) { "failed to get request body error", err) } + // Go 1.8 tightened and clarified the rules code needs to use when building + // requests with the http package. Go 1.8 removed the automatic detection + // of if the Request.Body was empty, or actually had bytes in it. The SDK + // always sets the Request.Body even if it is empty and should not actually + // be sent. This is incorrect. + // + // Go 1.8 did add a http.NoBody value that the SDK can use to tell the http + // client that the request really should be sent without a body. The + // Request.Body cannot be set to nil, which is preferable, because the + // field is exported and could introduce nil pointer dereferences for users + // of the SDK if they used that field. + // + // Related golang/go#18257 l, err := SeekerLen(r.Body) if err != nil { return nil, awserr.New(ErrCodeSerialization, diff --git a/aws/retryer.go b/aws/retryer.go index afaae30a593..2e8abf3c287 100644 --- a/aws/retryer.go +++ b/aws/retryer.go @@ -170,8 +170,7 @@ func shouldRetryError(origErr error) bool { return true default: - switch err.Error() { - case "net/http: request canceled": + if strings.Contains(err.Error(), "canceled") { return false } // here we don't know the error; so we allow a retry. diff --git a/internal/ini/walker_test.go b/internal/ini/walker_test.go index 2a1db5310fa..73f108b70a9 100644 --- a/internal/ini/walker_test.go +++ b/internal/ini/walker_test.go @@ -92,7 +92,7 @@ func TestValidDataFiles(t *testing.T) { return nil }) if err != nil { - t.Errorf("Error while walking the file tree rooted at root, %d", err) + t.Fatalf("Error while walking the file tree rooted at root, %d", err) } } diff --git a/internal/sdkmath/floor.go b/internal/sdkmath/floor.go deleted file mode 100644 index 47064629a46..00000000000 --- a/internal/sdkmath/floor.go +++ /dev/null @@ -1,13 +0,0 @@ -package sdkmath - -import "math" - -// Round returns the nearest integer, rounding half away from zero. -// -// Special cases are: -// Round(±0) = ±0 -// Round(±Inf) = ±Inf -// Round(NaN) = NaN -func Round(x float64) float64 { - return math.Round(x) -} diff --git a/private/protocol/timestamp.go b/private/protocol/timestamp.go index 1072d5b628e..93b39f5f501 100644 --- a/private/protocol/timestamp.go +++ b/private/protocol/timestamp.go @@ -5,8 +5,6 @@ import ( "math" "strconv" "time" - - "github.com/aws/aws-sdk-go-v2/internal/sdkmath" ) // Names of time formats supported by the SDK @@ -73,7 +71,7 @@ func ParseTime(formatName, value string) (time.Time, error) { case UnixTimeFormatName: v, err := strconv.ParseFloat(value, 64) _, dec := math.Modf(v) - dec = sdkmath.Round(dec*1e3) / 1e3 //Rounds 0.1229999 to 0.123 + dec = math.Round(dec*1e3) / 1e3 //Rounds 0.1229999 to 0.123 if err != nil { return time.Time{}, err } From 3db93a53d8634cf6cab3fcf2fea0dab880e1ce1f Mon Sep 17 00:00:00 2001 From: skotambkar Date: Fri, 20 Sep 2019 13:21:45 -0700 Subject: [PATCH 8/8] Adds suggested changes --- CHANGELOG_PENDING.md | 1 + internal/ini/walker_test.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 3ad29ef79f3..3b2481a0092 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -7,6 +7,7 @@ Deprecations * Removing plugin credential provider from the v2 SDK developer preview. This feature may be made available as a separate module. * Removes support for deprecated Go versions ([#393](https://github.com/aws/aws-sdk-go-v2/pull/393)) * Removes support for Go version specific files from the SDK. Also removes irrelevant build tags, and updates the README.md file. + * Raises the minimum supported version to Go 1.11 for the SDK. Older versions may work, but are not actively supported SDK Features --- diff --git a/internal/ini/walker_test.go b/internal/ini/walker_test.go index 73f108b70a9..f8e07bf5edb 100644 --- a/internal/ini/walker_test.go +++ b/internal/ini/walker_test.go @@ -11,7 +11,7 @@ import ( func TestValidDataFiles(t *testing.T) { const expectedFileSuffix = "_expected" - err := filepath.Walk("./testdata/valid", func(path string, info os.FileInfo, err error) error { + err := filepath.Walk(filepath.Join("testdata", "valid"), func(path string, info os.FileInfo, err error) error { if strings.HasSuffix(path, expectedFileSuffix) { return nil }