mirror of
https://github.com/netbirdio/netbird.git
synced 2025-08-08 23:05:28 +02:00
Add gocritic linter (#1324)
* Add gocritic linter `gocritic` provides diagnostics that check for bugs, performance, and style issues We disable the following checks: - commentFormatting - captLocal - deprecatedComment This PR contains many `//nolint:gocritic` to disable `appendAssign`.
This commit is contained in:
@ -248,7 +248,7 @@ func (s *SharedSocket) ReadFrom(b []byte) (n int, addr net.Addr, err error) {
|
||||
|
||||
decodedLayers := make([]gopacket.LayerType, 0, 3)
|
||||
|
||||
err = parser.DecodeLayers(pkt.buf[:], &decodedLayers)
|
||||
err = parser.DecodeLayers(pkt.buf, &decodedLayers)
|
||||
if err != nil {
|
||||
return 0, nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user