Changed snake case naming to camelCase
Signed-off-by: Peter Choi <phkchoi89@gmail.com>
This commit is contained in:
parent
3b068ebe39
commit
ecbb2a9d58
2 changed files with 8 additions and 8 deletions
|
@ -260,7 +260,7 @@ func Exists(table Table, chain string, rule ...string) bool {
|
|||
|
||||
// parse "iptables -S" for the rule (this checks rules in a specific chain
|
||||
// in a specific table)
|
||||
rule_string := strings.Join(rule, " ")
|
||||
ruleString := strings.Join(rule, " ")
|
||||
existingRules, _ := exec.Command("iptables", "-t", string(table), "-S", chain).Output()
|
||||
|
||||
// regex to replace ips in rule
|
||||
|
@ -269,7 +269,7 @@ func Exists(table Table, chain string, rule ...string) bool {
|
|||
|
||||
return strings.Contains(
|
||||
re.ReplaceAllString(string(existingRules), "?"),
|
||||
re.ReplaceAllString(rule_string, "?"),
|
||||
re.ReplaceAllString(ruleString, "?"),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue