Closed alegrey91 closed 2 years ago
Hi @squeed, thanks for your reply. So, you mean something like this?
// List rules in specified table/chain
func (ipt *IPTables) ListById(table, chain string, Id int) (string, error) {
args := []string{"-t", table, "-S", chain, strconv.Itoa(Id)}
rule, err := ipt.executeList(args)
if err != nil {
return "", err
}
return rule[0], nil
}
I think could be more appropriate the name ListById()
for this function, right?
Fix #95