Skip to content

Commit db91ade

Browse files
committed
Refactor interface type check to more idiomatic syntax
1 parent 6889d48 commit db91ade

File tree

278 files changed

+490
-490
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

278 files changed

+490
-490
lines changed

upup/pkg/fi/cloudup/awstasks/autoscalinggroup.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ type AutoscalingGroup struct {
108108
deletions []fi.CloudupDeletion
109109
}
110110

111-
var _ fi.CloudupProducesDeletions = &AutoscalingGroup{}
112-
var _ fi.CompareWithID = &AutoscalingGroup{}
113-
var _ fi.CloudupTaskNormalize = &AutoscalingGroup{}
111+
var _ fi.CloudupProducesDeletions = (*AutoscalingGroup)(nil)
112+
var _ fi.CompareWithID = (*AutoscalingGroup)(nil)
113+
var _ fi.CloudupTaskNormalize = (*AutoscalingGroup)(nil)
114114

115115
// CompareWithID returns the ID of the ASG
116116
func (e *AutoscalingGroup) CompareWithID() *string {
@@ -1108,7 +1108,7 @@ type deleteAutoscalingTargetGroupAttachment struct {
11081108
targetGroupARN string
11091109
}
11101110

1111-
var _ fi.CloudupDeletion = &deleteAutoscalingTargetGroupAttachment{}
1111+
var _ fi.CloudupDeletion = (*deleteAutoscalingTargetGroupAttachment)(nil)
11121112

11131113
func buildDeleteAutoscalingTargetGroupAttachment(autoScalingGroupName string, targetGroupARN string) *deleteAutoscalingTargetGroupAttachment {
11141114
d := &deleteAutoscalingTargetGroupAttachment{}

upup/pkg/fi/cloudup/awstasks/autoscalinggroup_fitask.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

upup/pkg/fi/cloudup/awstasks/autoscalinglifecyclehook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ type AutoscalingLifecycleHook struct {
4848
Enabled *bool
4949
}
5050

51-
var _ fi.CompareWithID = &AutoscalingLifecycleHook{}
51+
var _ fi.CompareWithID = (*AutoscalingLifecycleHook)(nil)
5252

5353
func (h *AutoscalingLifecycleHook) CompareWithID() *string {
5454
return h.Name

upup/pkg/fi/cloudup/awstasks/autoscalinglifecyclehook_fitask.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

upup/pkg/fi/cloudup/awstasks/block_device_mappings.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ func (i *BlockDeviceMapping) ToLaunchTemplateBootDeviceRequest(deviceName string
181181
return o
182182
}
183183

184-
var _ fi.CloudupHasDependencies = &BlockDeviceMapping{}
184+
var _ fi.CloudupHasDependencies = (*BlockDeviceMapping)(nil)
185185

186186
// GetDependencies is for future use
187187
func (i *BlockDeviceMapping) GetDependencies(tasks map[string]fi.CloudupTask) []fi.CloudupTask {

upup/pkg/fi/cloudup/awstasks/classic_load_balancer.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import (
3838

3939
// LoadBalancer manages an ELB. We find the existing ELB using the Name tag.
4040

41-
var _ DNSTarget = &ClassicLoadBalancer{}
41+
var _ DNSTarget = (*ClassicLoadBalancer)(nil)
4242

4343
// +kops:fitask
4444
type ClassicLoadBalancer struct {
@@ -79,8 +79,8 @@ type ClassicLoadBalancer struct {
7979
WellKnownServices []wellknownservices.WellKnownService
8080
}
8181

82-
var _ fi.CompareWithID = &ClassicLoadBalancer{}
83-
var _ fi.CloudupTaskNormalize = &ClassicLoadBalancer{}
82+
var _ fi.CompareWithID = (*ClassicLoadBalancer)(nil)
83+
var _ fi.CloudupTaskNormalize = (*ClassicLoadBalancer)(nil)
8484

8585
func (e *ClassicLoadBalancer) CompareWithID() *string {
8686
return e.Name
@@ -109,7 +109,7 @@ func (e *ClassicLoadBalancerListener) mapToAWS(loadBalancerPort int32) elbtypes.
109109
return l
110110
}
111111

112-
var _ fi.CloudupHasDependencies = &ClassicLoadBalancerListener{}
112+
var _ fi.CloudupHasDependencies = (*ClassicLoadBalancerListener)(nil)
113113

114114
func (e *ClassicLoadBalancerListener) GetDependencies(tasks map[string]fi.CloudupTask) []fi.CloudupTask {
115115
return nil
@@ -342,7 +342,7 @@ func (e *ClassicLoadBalancer) Find(c *fi.CloudupContext) (*ClassicLoadBalancer,
342342
return actual, nil
343343
}
344344

345-
var _ fi.HasAddress = &ClassicLoadBalancer{}
345+
var _ fi.HasAddress = (*ClassicLoadBalancer)(nil)
346346

347347
// GetWellKnownServices implements fi.HasAddress::GetWellKnownServices.
348348
// It indicates which services we support with this address (likely attached to a load balancer).

upup/pkg/fi/cloudup/awstasks/classic_loadbalancer_healthchecks.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type ClassicLoadBalancerHealthCheck struct {
3131
Timeout *int32
3232
}
3333

34-
var _ fi.CloudupHasDependencies = &ClassicLoadBalancerListener{}
34+
var _ fi.CloudupHasDependencies = (*ClassicLoadBalancerListener)(nil)
3535

3636
func (e *ClassicLoadBalancerHealthCheck) GetDependencies(tasks map[string]fi.CloudupTask) []fi.CloudupTask {
3737
return nil

upup/pkg/fi/cloudup/awstasks/classicloadbalancer_fitask.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

upup/pkg/fi/cloudup/awstasks/dhcp_options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ type DHCPOptions struct {
4747
Tags map[string]string
4848
}
4949

50-
var _ fi.CompareWithID = &DHCPOptions{}
50+
var _ fi.CompareWithID = (*DHCPOptions)(nil)
5151

5252
func (e *DHCPOptions) CompareWithID() *string {
5353
return e.ID

upup/pkg/fi/cloudup/awstasks/dhcpoptions_fitask.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)