2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 07:57:21 +08:00

fix: lint

This commit is contained in:
耗子
2024-10-12 17:35:37 +08:00
parent 198bd39664
commit 6ec5ebb18d
37 changed files with 408 additions and 408 deletions

View File

@@ -161,7 +161,7 @@ func (r *Firewall) RichRules(rule FireInfo, operation Operation) error {
ruleStr.WriteString(rule.Strategy)
_, err := shell.Execf("firewall-cmd --zone=public --%s-rich-rule '%s' --permanent", operation, ruleStr.String())
if err != nil {
return fmt.Errorf("%s rich rules (%s) failed, err: %s", operation, ruleStr.String(), err.Error())
return fmt.Errorf("%s rich rules (%s) failed, err: %v", operation, ruleStr.String(), err)
}
}
@@ -185,7 +185,7 @@ func (r *Firewall) PortForward(info Forward, operation Operation) error {
_, err := shell.Execf(ruleStr.String()) // nolint: govet
if err != nil {
return fmt.Errorf("%s port forward failed, err: %s", operation, err.Error())
return fmt.Errorf("%s port forward failed, err: %v", operation, err)
}
_, err = shell.Execf("firewall-cmd --reload")