diff options
| author | Dave Henderson <dhenderson@gmail.com> | 2021-04-03 13:18:17 -0400 |
|---|---|---|
| committer | Dave Henderson <dhenderson@gmail.com> | 2021-04-03 14:23:00 -0400 |
| commit | d334a3619a9897ff43b76b8f60fa1a0a41b9cbe9 (patch) | |
| tree | 97f9fe27182604e41f08183fc42a2e4b4bded7ba /aws | |
| parent | 507d41ae8a2536584eb032c98abc46496a77ea86 (diff) | |
Update linting and fix field alignment issues
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'aws')
| -rw-r--r-- | aws/ec2meta.go | 4 | ||||
| -rw-r--r-- | aws/sts_test.go | 2 | ||||
| -rw-r--r-- | aws/testutils.go | 8 |
3 files changed, 10 insertions, 4 deletions
diff --git a/aws/ec2meta.go b/aws/ec2meta.go index 72ee6f26..4165214c 100644 --- a/aws/ec2meta.go +++ b/aws/ec2meta.go @@ -22,11 +22,11 @@ const ( // Ec2Meta - type Ec2Meta struct { - Endpoint string Client *http.Client - nonAWS bool cache map[string]string + Endpoint string options ClientOptions + nonAWS bool } // NewEc2Meta - diff --git a/aws/sts_test.go b/aws/sts_test.go index df66288e..85bbeccd 100644 --- a/aws/sts_test.go +++ b/aws/sts_test.go @@ -88,8 +88,8 @@ func TestGetCallerIDErrors(t *testing.T) { } type DummyCallerIdentifier struct { - account, arn, userID string err error + account, arn, userID string } func (c *DummyCallerIdentifier) GetCallerIdentity(*sts.GetCallerIdentityInput) (*sts.GetCallerIdentityOutput, error) { diff --git a/aws/testutils.go b/aws/testutils.go index 8db7bb6c..9f4c0240 100644 --- a/aws/testutils.go +++ b/aws/testutils.go @@ -13,7 +13,13 @@ import ( func MockServer(code int, body string) (*httptest.Server, *Ec2Meta) { server, httpClient := MockHTTPServer(code, body) - client := &Ec2Meta{server.URL + "/", httpClient, false, make(map[string]string), ClientOptions{}} + client := &Ec2Meta{ + Client: httpClient, + cache: make(map[string]string), + Endpoint: server.URL + "/", + options: ClientOptions{}, + nonAWS: false, + } return server, client } |
