Maint: firewall package interface rework

- return concrete struct type
- split interface is sub-interfaces
This commit is contained in:
Quentin McGaw (desktop)
2021-07-23 19:12:16 +00:00
parent 10aabe8375
commit 2ddc784965
9 changed files with 54 additions and 40 deletions

View File

@@ -4,7 +4,7 @@ import (
"context"
)
func (c *configurator) runMixedIptablesInstructions(ctx context.Context, instructions []string) error {
func (c *Config) runMixedIptablesInstructions(ctx context.Context, instructions []string) error {
for _, instruction := range instructions {
if err := c.runMixedIptablesInstruction(ctx, instruction); err != nil {
return err
@@ -13,7 +13,7 @@ func (c *configurator) runMixedIptablesInstructions(ctx context.Context, instruc
return nil
}
func (c *configurator) runMixedIptablesInstruction(ctx context.Context, instruction string) error {
func (c *Config) runMixedIptablesInstruction(ctx context.Context, instruction string) error {
if err := c.runIptablesInstruction(ctx, instruction); err != nil {
return err
}