Skip to content

Commit a622cf8

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

33 files changed

+61
-61
lines changed

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

Lines changed: 1 addition & 1 deletion
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 {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import (
3939
)
4040

4141
// NetworkLoadBalancer manages an NLB. We find the existing NLB using the Name tag.
42-
var _ DNSTarget = &NetworkLoadBalancer{}
42+
var _ DNSTarget = (*NetworkLoadBalancer)(nil)
4343

4444
// +kops:fitask
4545
type NetworkLoadBalancer struct {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ type PortRemovalRule struct {
435435
ToPort int
436436
}
437437

438-
var _ RemovalRule = &PortRemovalRule{}
438+
var _ RemovalRule = (*PortRemovalRule)(nil)
439439

440440
func (r *PortRemovalRule) String() string {
441441
return fi.DebugAsJsonString(r)

upup/pkg/fi/cloudup/azure/applicationsecuritygroup.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ type ApplicationSecurityGroupsClientImpl struct {
3737
c *network.ApplicationSecurityGroupsClient
3838
}
3939

40-
var _ ApplicationSecurityGroupsClient = &ApplicationSecurityGroupsClientImpl{}
40+
var _ ApplicationSecurityGroupsClient = (*ApplicationSecurityGroupsClientImpl)(nil)
4141

4242
func (c *ApplicationSecurityGroupsClientImpl) CreateOrUpdate(ctx context.Context, resourceGroupName, applicationSecurityGroupName string, parameters network.ApplicationSecurityGroup) (*network.ApplicationSecurityGroup, error) {
4343
future, err := c.c.BeginCreateOrUpdate(ctx, resourceGroupName, applicationSecurityGroupName, parameters, nil)

upup/pkg/fi/cloudup/azure/disk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ type disksClientImpl struct {
3535
c *compute.DisksClient
3636
}
3737

38-
var _ DisksClient = &disksClientImpl{}
38+
var _ DisksClient = (*disksClientImpl)(nil)
3939

4040
func (c *disksClientImpl) CreateOrUpdate(ctx context.Context, resourceGroupName, diskName string, parameters compute.Disk) (*compute.Disk, error) {
4141
future, err := c.c.BeginCreateOrUpdate(ctx, resourceGroupName, diskName, parameters, nil)

upup/pkg/fi/cloudup/azure/loadbalancer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ type loadBalancersClientImpl struct {
3939
c *network.LoadBalancersClient
4040
}
4141

42-
var _ LoadBalancersClient = &loadBalancersClientImpl{}
42+
var _ LoadBalancersClient = (*loadBalancersClientImpl)(nil)
4343

4444
func (c *loadBalancersClientImpl) CreateOrUpdate(ctx context.Context, resourceGroupName, loadBalancerName string, parameters network.LoadBalancer) (*network.LoadBalancer, error) {
4545
future, err := c.c.BeginCreateOrUpdate(ctx, resourceGroupName, loadBalancerName, parameters, nil)

upup/pkg/fi/cloudup/azure/natgateway.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ type NatGatewaysClientImpl struct {
3737
c *network.NatGatewaysClient
3838
}
3939

40-
var _ NatGatewaysClient = &NatGatewaysClientImpl{}
40+
var _ NatGatewaysClient = (*NatGatewaysClientImpl)(nil)
4141

4242
func (c *NatGatewaysClientImpl) CreateOrUpdate(ctx context.Context, resourceGroupName, natGatewayName string, parameters network.NatGateway) (*network.NatGateway, error) {
4343
future, err := c.c.BeginCreateOrUpdate(ctx, resourceGroupName, natGatewayName, parameters, nil)

upup/pkg/fi/cloudup/azure/networkinterface.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ type networkInterfacesClientImpl struct {
3333
c *network.InterfacesClient
3434
}
3535

36-
var _ NetworkInterfacesClient = &networkInterfacesClientImpl{}
36+
var _ NetworkInterfacesClient = (*networkInterfacesClientImpl)(nil)
3737

3838
func (c *networkInterfacesClientImpl) ListScaleSetsNetworkInterfaces(ctx context.Context, resourceGroupName, vmssName string) ([]*network.Interface, error) {
3939
var l []*network.Interface

upup/pkg/fi/cloudup/azure/networksecuritygroup.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ type NetworkSecurityGroupsClientImpl struct {
3737
c *network.SecurityGroupsClient
3838
}
3939

40-
var _ NetworkSecurityGroupsClient = &NetworkSecurityGroupsClientImpl{}
40+
var _ NetworkSecurityGroupsClient = (*NetworkSecurityGroupsClientImpl)(nil)
4141

4242
func (c *NetworkSecurityGroupsClientImpl) CreateOrUpdate(ctx context.Context, resourceGroupName, NetworkSecurityGroupName string, parameters network.SecurityGroup) (*network.SecurityGroup, error) {
4343
future, err := c.c.BeginCreateOrUpdate(ctx, resourceGroupName, NetworkSecurityGroupName, parameters, nil)

upup/pkg/fi/cloudup/azure/publicipaddress.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ type publicIPAddressesClientImpl struct {
3737
c *network.PublicIPAddressesClient
3838
}
3939

40-
var _ PublicIPAddressesClient = &publicIPAddressesClientImpl{}
40+
var _ PublicIPAddressesClient = (*publicIPAddressesClientImpl)(nil)
4141

4242
func (c *publicIPAddressesClientImpl) CreateOrUpdate(ctx context.Context, resourceGroupName, publicIPAddressName string, parameters network.PublicIPAddress) (*network.PublicIPAddress, error) {
4343
future, err := c.c.BeginCreateOrUpdate(ctx, resourceGroupName, publicIPAddressName, parameters, nil)

0 commit comments

Comments
 (0)