diff --git a/internal/cmd/firewall/add_rule.go b/internal/cmd/firewall/add_rule.go index ac5648fd..54d1ec12 100644 --- a/internal/cmd/firewall/add_rule.go +++ b/internal/cmd/firewall/add_rule.go @@ -71,10 +71,9 @@ var AddRuleCmd = base.Cmd{ } switch rule.Protocol { - case hcloud.FirewallRuleProtocolTCP: - case hcloud.FirewallRuleProtocolUDP: + case hcloud.FirewallRuleProtocolUDP, hcloud.FirewallRuleProtocolTCP: if port == "" { - return fmt.Errorf("port is required") + return fmt.Errorf("port is required (--port)") } default: if port != "" { diff --git a/internal/cmd/firewall/delete_rule.go b/internal/cmd/firewall/delete_rule.go index cf16a3b4..fd98dc20 100644 --- a/internal/cmd/firewall/delete_rule.go +++ b/internal/cmd/firewall/delete_rule.go @@ -70,10 +70,9 @@ var DeleteRuleCmd = base.Cmd{ } switch rule.Protocol { - case hcloud.FirewallRuleProtocolTCP: - case hcloud.FirewallRuleProtocolUDP: + case hcloud.FirewallRuleProtocolTCP, hcloud.FirewallRuleProtocolUDP: if port == "" { - return fmt.Errorf("port is required") + return fmt.Errorf("port is required (--port)") } default: if port != "" {