Skip to content

Commit

Permalink
gosimple
Browse files Browse the repository at this point in the history
  • Loading branch information
phm07 committed Aug 12, 2024
1 parent 5cf21ef commit c6d6d09
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ linters:
- gci
- gomodguard
- gosec
# - gosimple
- gosimple
- govet
- ineffassign
- misspell
Expand Down
3 changes: 0 additions & 3 deletions internal/cmd/loadbalancer/add_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,9 @@ var AddServiceCmd = base.Cmd{
if listenPort == 0 {
return fmt.Errorf("please specify a listen port")
}

if destinationPort == 0 {
return fmt.Errorf("please specify a destination port")
}
break
case hcloud.LoadBalancerServiceProtocolHTTPS:
if len(httpCertificates) == 0 {
return fmt.Errorf("no certificate specified")
Expand Down Expand Up @@ -153,7 +151,6 @@ var AddServiceCmd = base.Cmd{
switch proto := hcloud.LoadBalancerServiceProtocol(healthCheckProtocol); proto {
case hcloud.LoadBalancerServiceProtocolHTTP, hcloud.LoadBalancerServiceProtocolHTTPS, hcloud.LoadBalancerServiceProtocolTCP:
opts.HealthCheck.Protocol = proto
break
default:
return fmt.Errorf("invalid health check protocol: %s", healthCheckProtocol)
}
Expand Down
4 changes: 1 addition & 3 deletions internal/cmd/server/attach_to_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ var AttachToNetworkCmd = base.Cmd{
Network: network,
IP: ip,
}
for _, aliasIP := range aliasIPs {
opts.AliasIPs = append(opts.AliasIPs, aliasIP)
}
opts.AliasIPs = append(opts.AliasIPs, aliasIPs...)
action, _, err := s.Client().Server().AttachToNetwork(s, server, opts)

if err != nil {
Expand Down

0 comments on commit c6d6d09

Please sign in to comment.