Skip to content

Commit 391deb0

Browse files
committed
Fix linter warning
sshauditor/netutil.go:21::warning: declaration of "ip" shadows declaration at netutil.go:17 (vetshadow)
1 parent f9e0f8f commit 391deb0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sshauditor/netutil.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ func ExpandCIDRs(netblocks []string) ([]string, error) {
1818
if err != nil {
1919
return hosts, err
2020
}
21-
for ip := ip.Mask(ipnet.Mask); ipnet.Contains(ip); inc(ip) {
22-
hosts = append(hosts, ip.String())
21+
for h := ip.Mask(ipnet.Mask); ipnet.Contains(h); inc(h) {
22+
hosts = append(hosts, h.String())
2323
}
2424
}
2525
return hosts, nil

0 commit comments

Comments
 (0)