Skip to content

Commit

Permalink
hostport: use generic Set
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Hunt~ <[email protected]>
  • Loading branch information
haircommander committed Jan 5, 2023
1 parent dcc7437 commit 89029ed
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/hostport/fake_iptables.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ type fakeTable struct {

type fakeIPTables struct {
tables map[string]*fakeTable
builtinChains map[string]sets.String
builtinChains map[string]sets.Set[string]
protocol utiliptables.Protocol
}

func newFakeIPTables() *fakeIPTables {
return &fakeIPTables{
tables: make(map[string]*fakeTable),
builtinChains: map[string]sets.String{
string(utiliptables.TableFilter): sets.NewString("INPUT", "FORWARD", "OUTPUT"),
string(utiliptables.TableNAT): sets.NewString("PREROUTING", "INPUT", "OUTPUT", "POSTROUTING"),
string(utiliptables.TableMangle): sets.NewString("PREROUTING", "INPUT", "FORWARD", "OUTPUT", "POSTROUTING"),
builtinChains: map[string]sets.Set[string]{
string(utiliptables.TableFilter): sets.New("INPUT", "FORWARD", "OUTPUT"),
string(utiliptables.TableNAT): sets.New("PREROUTING", "INPUT", "OUTPUT", "POSTROUTING"),
string(utiliptables.TableMangle): sets.New("PREROUTING", "INPUT", "FORWARD", "OUTPUT", "POSTROUTING"),
},
protocol: utiliptables.ProtocolIPv4,
}
Expand Down

0 comments on commit 89029ed

Please sign in to comment.