Skip to content

Commit f7155c6

Browse files
committed
style: fix lint
Signed-off-by: Hunter Gregory <[email protected]>
1 parent 10f1f14 commit f7155c6

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

npm/pkg/dataplane/policies/chain-management_linux.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,6 @@ func (pMgr *PolicyManager) detectIptablesVersion() {
261261

262262
// default to nft if nothing is found
263263
util.SetIptablesToNft()
264-
return
265264
}
266265

267266
func (pMgr *PolicyManager) hintOrCanaryChainExist(iptablesCmd string) bool {

npm/pkg/dataplane/policies/chain-management_linux_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,9 +1349,7 @@ func TestCleanupOtherChains(t *testing.T) {
13491349
} else {
13501350
util.SetIptablesToLegacy()
13511351
// set back to default
1352-
defer func() {
1353-
util.SetIptablesToNft()
1354-
}()
1352+
defer util.SetIptablesToNft()
13551353
}
13561354

13571355
err := pMgr.cleanupOtherIptables()

npm/pkg/dataplane/policies/policymanager_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,7 @@ func TestBootup(t *testing.T) {
109109
// verify that the iptables is explicitly set to nft during bootup
110110
util.SetIptablesToLegacy()
111111
// set back to default
112-
defer func() {
113-
util.SetIptablesToNft()
114-
}()
112+
defer util.SetIptablesToNft()
115113

116114
metrics.IncNumACLRules()
117115
metrics.IncNumACLRules()

0 commit comments

Comments
 (0)