mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-08-14 14:43:46 +00:00
Fix linter errors
This commit is contained in:
parent
8039970116
commit
82f8f6f20f
@ -52,7 +52,7 @@ func (h *afPacketHandle) SetBPF(expr string) (err error) {
|
||||
}
|
||||
bpfIns = append(bpfIns, bpfIns2)
|
||||
}
|
||||
h.capture.SetBPF(bpfIns)
|
||||
err = h.capture.SetBPF(bpfIns)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -9,10 +9,8 @@ import (
|
||||
)
|
||||
|
||||
type pcapHandle struct {
|
||||
source *gopacket.PacketSource
|
||||
capture *pcap.Handle
|
||||
decoder gopacket.Decoder
|
||||
decodeOptions gopacket.DecodeOptions
|
||||
source *gopacket.PacketSource
|
||||
capture *pcap.Handle
|
||||
}
|
||||
|
||||
func (h *pcapHandle) NextPacket() (packet gopacket.Packet, err error) {
|
||||
|
@ -76,7 +76,7 @@ func newTcpPacketSource(name, filename string, interfaceName string,
|
||||
logger.Log.Infof("Using AF_PACKET socket as the capture source")
|
||||
}
|
||||
|
||||
decoder := gopacket.DecodersByLayerName[fmt.Sprintf("%s", layers.LinkTypeEthernet)]
|
||||
decoder := gopacket.DecodersByLayerName[string(layers.LinkTypeEthernet)]
|
||||
result.Handle.SetDecoder(decoder, behaviour.Lazy, true)
|
||||
|
||||
if behaviour.BpfFilter != "" {
|
||||
|
Loading…
Reference in New Issue
Block a user