From d334a3619a9897ff43b76b8f60fa1a0a41b9cbe9 Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Sat, 3 Apr 2021 13:18:17 -0400 Subject: Update linting and fix field alignment issues Signed-off-by: Dave Henderson --- aws/ec2meta.go | 4 ++-- aws/sts_test.go | 2 +- aws/testutils.go | 8 +++++++- 3 files changed, 10 insertions(+), 4 deletions(-) (limited to 'aws') 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 } -- cgit v1.2.3