Skip to content

Commit

Permalink
fix: Linter warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Steffen Vogel <[email protected]>
  • Loading branch information
stv0g committed Sep 16, 2024
1 parent edab624 commit 3c4c1cb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/utils/ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func AddressRange(network *net.IPNet) (net.IP, net.IP) {
}

firstIPInt, bits := ipToInt(firstIP)
hostLen := uint(bits) - uint(prefixLen)
hostLen := uint(bits) - uint(prefixLen) //nolint:gosec
lastIPInt := big.NewInt(1)
lastIPInt.Lsh(lastIPInt, hostLen)
lastIPInt.Add(lastIPInt, firstIPInt)
Expand Down
4 changes: 2 additions & 2 deletions pkg/capture_pcap.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (h pcapPacketSource) Stats() (captureStats, error) {
}

return captureStats{
PacketsReceived: uint64(s.PacketsReceived),
PacketsDropped: uint64(s.PacketsDropped),
PacketsReceived: uint64(s.PacketsReceived), //nolint:gosec
PacketsDropped: uint64(s.PacketsDropped), //nolint:gosec
}, nil
}
2 changes: 1 addition & 1 deletion pkg/trace/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func (c *traceCore) Write(e zapcore.Entry, fields []zapcore.Field) error {
Timestamp: time.Now(),
Message: strings.TrimSpace(e.Message),
Source: e.LoggerName,
Level: uint8(e.Level) + 2, // 0 -> omitempty
Level: uint8(e.Level) + 2, //nolint:gosec // 0 -> omitempty
Function: e.Caller.Function,
Line: e.Caller.Line,
File: e.Caller.File,
Expand Down

0 comments on commit 3c4c1cb

Please sign in to comment.