Skip to content

Commit

Permalink
sshkey + firewall rule linted
Browse files Browse the repository at this point in the history
  • Loading branch information
ddymko committed Nov 19, 2020
1 parent 710f3ab commit d9666b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
8 changes: 2 additions & 6 deletions firewall_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type FirewallRule struct {
Notes string `json:"notes"`
}

// FirewallRuleReq
// FirewallRuleReq struct used to create a FirewallRule.
type FirewallRuleReq struct {
IPType string `json:"ip_type"`
Protocol string `json:"protocol"`
Expand Down Expand Up @@ -97,11 +97,7 @@ func (f *FireWallRuleServiceHandler) Delete(ctx context.Context, fwGroupID strin
return err
}

if err = f.client.DoWithContext(ctx, req, nil); err != nil {
return err
}

return nil
return f.client.DoWithContext(ctx, req, nil)
}

// List will return both ipv4 an ipv6 firewall rules that are defined within a firewall group
Expand Down
12 changes: 2 additions & 10 deletions ssh_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,7 @@ func (s *SSHKeyServiceHandler) Update(ctx context.Context, sshKeyID string, sshK
return err
}

if err = s.client.DoWithContext(ctx, req, nil); err != nil {
return err
}

return nil
return s.client.DoWithContext(ctx, req, nil)
}

// Delete a specific ssh-key.
Expand All @@ -104,11 +100,7 @@ func (s *SSHKeyServiceHandler) Delete(ctx context.Context, sshKeyID string) erro
return err
}

if err = s.client.DoWithContext(ctx, req, nil); err != nil {
return err
}

return nil
return s.client.DoWithContext(ctx, req, nil)
}

// List all available SSH Keys.
Expand Down

0 comments on commit d9666b7

Please sign in to comment.