mirror of
https://github.com/netbirdio/netbird.git
synced 2025-06-10 20:07:15 +02:00
Fix linter issues
This commit is contained in:
parent
657413b8a6
commit
fa27369b59
@ -52,7 +52,7 @@ func (m *localIPManager) processIP(ip net.IP, newIPv4Bitmap *[1 << 16]uint32, ip
|
||||
if _, exists := ipv4Set[ipStr]; !exists {
|
||||
ipv4Set[ipStr] = struct{}{}
|
||||
*ipv4Addresses = append(*ipv4Addresses, ipStr)
|
||||
(*newIPv4Bitmap)[high] |= 1 << (low % 32)
|
||||
newIPv4Bitmap[high] |= 1 << (low % 32)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
@ -52,6 +52,7 @@ func BenchmarkIPChecks(b *testing.B) {
|
||||
ip := interfaces[4]
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
// nolint:gosimple
|
||||
_, _ = mapManager.localIPs[ip.String()]
|
||||
}
|
||||
})
|
||||
@ -60,6 +61,7 @@ func BenchmarkIPChecks(b *testing.B) {
|
||||
ip := interfaces[12]
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
// nolint:gosimple
|
||||
_, _ = mapManager.localIPs[ip.String()]
|
||||
}
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user