Skip to content

Commit

Permalink
Address nonamedreturns linter violations
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Pantelis <[email protected]>
  • Loading branch information
tpantelis committed Dec 4, 2024
1 parent 099851b commit b1060b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions pkg/azure/cloud_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ func (c *CloudInfo) getPublicIP(ctx context.Context, publicIPName string, pubIPC
}

func (c *CloudInfo) createPublicIP(ctx context.Context, ipName string, ipClient *armnetwork.PublicIPAddressesClient,
) (ip armnetwork.PublicIPAddress, err error) {
) (armnetwork.PublicIPAddress, error) {
ipVersion := armnetwork.IPVersionIPv4
ipAllocMethod := armnetwork.IPAllocationMethodStatic
skuName := armnetwork.PublicIPAddressSKUNameStandard
Expand All @@ -390,18 +390,18 @@ func (c *CloudInfo) createPublicIP(ctx context.Context, ipName string, ipClient
},
}, nil)
if err != nil {
return ip, errors.Wrapf(err, "cannot create public ip address: %q", ipName)
return armnetwork.PublicIPAddress{}, errors.Wrapf(err, "cannot create public ip address: %q", ipName)
}

resp, err := poller.PollUntilDone(ctx, nil)
if err != nil {
return ip, errors.Wrapf(err, "cannot get public ip address create or update response: %q", ipName)
return armnetwork.PublicIPAddress{}, errors.Wrapf(err, "cannot get public ip address create or update response: %q", ipName)
}

return resp.PublicIPAddress, nil
}

func (c *CloudInfo) deletePublicIP(ctx context.Context, ipClient *armnetwork.PublicIPAddressesClient, ipName string) (err error) {
func (c *CloudInfo) deletePublicIP(ctx context.Context, ipClient *armnetwork.PublicIPAddressesClient, ipName string) error {
poller, err := ipClient.BeginDelete(ctx, c.BaseGroupName, ipName, nil)
if err != nil {
return errors.Wrapf(err, "failed to delete public ip : %q", ipName)
Expand Down
4 changes: 2 additions & 2 deletions pkg/gcp/firewall_rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const (
submarinerGatewayNodeTag = "submariner-io-gateway-node"
)

func newExternalFirewallRules(projectID, infraID string, ports []api.PortSpec) (ingress *compute.Firewall) {
func newExternalFirewallRules(projectID, infraID string, ports []api.PortSpec) *compute.Firewall {
ingressName := generateRuleName(infraID, publicPortsRuleName)

// We want the external firewall rules to be applied only to Gateway nodes. So, we use the TargetTags
Expand Down Expand Up @@ -85,6 +85,6 @@ func newFirewallRule(projectID, infraID, name, direction string, ports []api.Por
}
}

func generateRuleName(infraID, name string) (ingressName string) {
func generateRuleName(infraID, name string) string {
return fmt.Sprintf("%s-%s-ingress", infraID, name)
}

0 comments on commit b1060b4

Please sign in to comment.