Update code to the latest golangci-lint

This commit is contained in:
9seconds
2021-07-31 11:35:05 +03:00
parent dc99dd165e
commit eaa757b6d0
9 changed files with 14 additions and 18 deletions
+2 -2
View File
@@ -119,7 +119,7 @@ func (f *Firehol) Run(updateEach time.Duration) {
}
func (f *Firehol) containsIPv4(addr net.IP) bool {
ip := patricia.NewIPv4AddressFromBytes(addr, 32)
ip := patricia.NewIPv4AddressFromBytes(addr, 32) // nolint: gomnd
if ok, _, err := f.treeV4.FindDeepestTag(ip); ok && err == nil {
return true
@@ -129,7 +129,7 @@ func (f *Firehol) containsIPv4(addr net.IP) bool {
}
func (f *Firehol) containsIPv6(addr net.IP) bool {
ip := patricia.NewIPv6Address(addr, 128)
ip := patricia.NewIPv6Address(addr, 128) // nolint: gomnd
if ok, _, err := f.treeV6.FindDeepestTag(ip); ok && err == nil {
return true