From 98b836b10256e4abb2ae10a98aedf7799cf97f32 Mon Sep 17 00:00:00 2001 From: Daniel Spangenberg Date: Wed, 7 Nov 2018 11:47:56 +0100 Subject: [PATCH] Improve variable naming for placement matcher --- pkg/cloud/aws/actuators/machine/actuator_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/cloud/aws/actuators/machine/actuator_test.go b/pkg/cloud/aws/actuators/machine/actuator_test.go index beebde92b6..b4dd6728ee 100644 --- a/pkg/cloud/aws/actuators/machine/actuator_test.go +++ b/pkg/cloud/aws/actuators/machine/actuator_test.go @@ -522,22 +522,22 @@ func mockRunInstancesForPlacement(mockAWSClient *mockaws.MockClient, availabilit } type placementMatcher struct { - x *ec2.Placement + placement *ec2.Placement } -func (m placementMatcher) Matches(x interface{}) bool { - input, ok := x.(*ec2.RunInstancesInput) +func (m placementMatcher) Matches(input interface{}) bool { + runInstancesInput, ok := input.(*ec2.RunInstancesInput) if !ok { return false } - if input.Placement == m.x { + if runInstancesInput.Placement == m.placement { return true } return false } func (m placementMatcher) String() string { - return fmt.Sprintf("is placement: %#v", m.x) + return fmt.Sprintf("is placement: %#v", m.placement) } -func Placement(x *ec2.Placement) gomock.Matcher { return placementMatcher{x} } +func Placement(placement *ec2.Placement) gomock.Matcher { return placementMatcher{placement} }