Skip to content

Commit d5995a2

Browse files
committed
fix revive linter
Signed-off-by: Mads Jensen <atombrella@users.noreply.github.com>
1 parent 2473c77 commit d5995a2

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

.golangci.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,21 @@ linters:
2525
pkg: ^github.com/vishvananda/netlink$
2626
msg: Use internal netlinksafe package for EINTR handling.
2727
analyze-types: true
28+
revive:
29+
max-open-files: 2048
30+
enable-default-rules: true
31+
rules:
32+
- name: var-naming
33+
arguments:
34+
- ["ID"] # AllowList
35+
- ["VM"] # DenyList
36+
- - skip-initialism-name-checks: true
37+
upper-case-const: true
38+
skip-package-name-checks: true
39+
skip-package-name-collision-with-go-std: true
40+
extra-bad-package-names:
41+
- helpers
42+
- models
2843
staticcheck:
2944
checks:
3045
- all

pkg/ip/ipmasq_iptables_linux.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ func setupIPMasqIPTables(ipns []*net.IPNet, network, _, containerID string) erro
4141

4242
// SetupIPMasq installs iptables rules to masquerade traffic
4343
// coming from ip of ipn and going outside of ipn.
44+
//
4445
// Deprecated: This function only supports iptables. Use SetupIPMasqForNetworks, which
4546
// supports both iptables and nftables.
4647
func SetupIPMasq(ipn *net.IPNet, chain string, comment string) error {
@@ -115,6 +116,7 @@ func teardownIPMasqIPTables(ipns []*net.IPNet, network, _, containerID string) e
115116
}
116117

117118
// TeardownIPMasq undoes the effects of SetupIPMasq.
119+
//
118120
// Deprecated: This function only supports iptables. Use TeardownIPMasqForNetworks, which
119121
// supports both iptables and nftables.
120122
func TeardownIPMasq(ipn *net.IPNet, chain string, comment string) error {

0 commit comments

Comments
 (0)