Maint: upgrade qdm12 dependencies

- Upgrade qdm12/golibs
- Upgrade qdm12/dns to v1.11.0
This commit is contained in:
Quentin McGaw (laptop)
2021-07-24 17:59:22 +00:00
parent 7e343d7006
commit 3f1fb52fcb
11 changed files with 107 additions and 29 deletions

View File

@@ -47,9 +47,9 @@ func flipRule(rule string) string {
}
// Version obtains the version of the installed iptables.
func Version(ctx context.Context, commander command.Commander) (string, error) {
func Version(ctx context.Context, runner command.Runner) (string, error) {
cmd := exec.CommandContext(ctx, "iptables", "--version")
output, err := commander.Run(cmd)
output, err := runner.Run(cmd)
if err != nil {
return "", err
}
@@ -78,7 +78,7 @@ func (c *Config) runIptablesInstruction(ctx context.Context, instruction string)
flags := strings.Fields(instruction)
cmd := exec.CommandContext(ctx, "iptables", flags...)
if output, err := c.commander.Run(cmd); err != nil {
if output, err := c.runner.Run(cmd); err != nil {
return fmt.Errorf("%w \"iptables %s\": %s: %s", ErrIPTables, instruction, output, err)
}
return nil