repochecker/ip-inspector: gofmt + CI
This commit is contained in:
parent
f1a2e6c360
commit
83be5595ba
5 changed files with 12 additions and 16 deletions
|
|
@ -31,9 +31,7 @@ type PcapNgReader struct {
|
|||
*pcapgo.NgReader
|
||||
}
|
||||
|
||||
//
|
||||
// Impl interface for reading pcap and pcapng data
|
||||
//
|
||||
func (pcapReader *PcapReader) ReadPacketData() (data []byte, ci gopacket.CaptureInfo, err error) {
|
||||
return pcapReader.Reader.ReadPacketData()
|
||||
}
|
||||
|
|
@ -42,12 +40,9 @@ func (pcapNGReader *PcapNgReader) ReadPacketData() (data []byte, ci gopacket.Cap
|
|||
return pcapNGReader.NgReader.ReadPacketData()
|
||||
}
|
||||
|
||||
//
|
||||
// Iterate thought each packet to find potentialy unwanted packets
|
||||
// TODO: Allow custom rules to specify what is a unwanted packet
|
||||
//
|
||||
func CheckPcap(pcapReader PcapPacketDataReader, pcapName string) (errs []error) {
|
||||
|
||||
warningFlows := make(map[gopacket.Flow]([]time.Time))
|
||||
|
||||
//
|
||||
|
|
@ -63,7 +58,7 @@ func CheckPcap(pcapReader PcapPacketDataReader, pcapName string) (errs []error)
|
|||
if packetNetworkLayer == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
flow := packetNetworkLayer.NetworkFlow()
|
||||
|
||||
ENDPOINT_SELECTION:
|
||||
|
|
@ -117,7 +112,7 @@ func CheckTextFile(fd *os.File) (errs []error) {
|
|||
func InspectFileForIPAddr(file *fic.EFile, exceptions *sync.CheckExceptions) (errs []error) {
|
||||
i, ok := sync.GlobalImporter.(sync.LocalImporter)
|
||||
if !ok {
|
||||
log.Printf("Unable to load `ip-inspector.so` as the current Importer is not a LocalImporter (%T).", sync.GlobalImporter)
|
||||
log.Printf("Unable to load `pcap-inspector.so` as the current Importer is not a LocalImporter (%T).", sync.GlobalImporter)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue