diff options
Diffstat (limited to 'aws')
| -rw-r--r-- | aws/ec2info.go | 4 | ||||
| -rw-r--r-- | aws/ec2info_test.go | 8 | ||||
| -rw-r--r-- | aws/ec2meta_test.go | 2 | ||||
| -rw-r--r-- | aws/sts.go | 4 | ||||
| -rw-r--r-- | aws/testutils.go | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/aws/ec2info.go b/aws/ec2info.go index 556d2efc..ba494d2b 100644 --- a/aws/ec2info.go +++ b/aws/ec2info.go @@ -33,7 +33,7 @@ type ClientOptions struct { type Ec2Info struct { describer func() (InstanceDescriber, error) metaClient *Ec2Meta - cache map[string]interface{} + cache map[string]any } // InstanceDescriber - A subset of ec2iface.EC2API that we can use to call EC2.DescribeInstances @@ -137,7 +137,7 @@ func NewEc2Info(options ClientOptions) (info *Ec2Info) { return describerClient, nil }, metaClient: metaClient, - cache: make(map[string]interface{}), + cache: make(map[string]any), } } diff --git a/aws/ec2info_test.go b/aws/ec2info_test.go index 497f50d1..87db85a3 100644 --- a/aws/ec2info_test.go +++ b/aws/ec2info_test.go @@ -32,7 +32,7 @@ func TestTag_MissingKey(t *testing.T) { return client, nil }, metaClient: ec2meta, - cache: make(map[string]interface{}), + cache: make(map[string]any), } assert.Empty(t, must(e.Tag("missing"))) @@ -59,7 +59,7 @@ func TestTag_ValidKey(t *testing.T) { return client, nil }, metaClient: ec2meta, - cache: make(map[string]interface{}), + cache: make(map[string]any), } assert.Equal(t, "bar", must(e.Tag("foo"))) @@ -85,7 +85,7 @@ func TestTags(t *testing.T) { return client, nil }, metaClient: ec2meta, - cache: make(map[string]interface{}), + cache: make(map[string]any), } assert.Equal(t, map[string]string{"foo": "bar", "baz": "qux"}, must(e.Tags())) @@ -101,7 +101,7 @@ func TestTag_NonEC2(t *testing.T) { return client, nil }, metaClient: ec2meta, - cache: make(map[string]interface{}), + cache: make(map[string]any), } assert.Equal(t, "", must(e.Tag("foo"))) diff --git a/aws/ec2meta_test.go b/aws/ec2meta_test.go index 732f97b6..fcc6da67 100644 --- a/aws/ec2meta_test.go +++ b/aws/ec2meta_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" ) -func must(r interface{}, err error) interface{} { +func must(r any, err error) any { if err != nil { panic(err) } @@ -8,7 +8,7 @@ import ( // STS - type STS struct { identifier func() CallerIdentitifier - cache map[string]interface{} + cache map[string]any } var identifierClient CallerIdentitifier @@ -28,7 +28,7 @@ func NewSTS(_ ClientOptions) *STS { } return identifierClient }, - cache: make(map[string]interface{}), + cache: make(map[string]any), } } diff --git a/aws/testutils.go b/aws/testutils.go index bc57e117..23a83c87 100644 --- a/aws/testutils.go +++ b/aws/testutils.go @@ -26,7 +26,7 @@ func NewDummyEc2Info(metaClient *Ec2Meta) *Ec2Info { i := &Ec2Info{ metaClient: metaClient, describer: func() (InstanceDescriber, error) { return DummyInstanceDescriber{}, nil }, - cache: map[string]interface{}{}, + cache: map[string]any{}, } return i } |
