Clean up some lint warnings

I ran golangci-lint and it pointed out a few things to clean up.
This commit is contained in:
Bryan Boreham committed 2020-07-31 10:28:55 +00:00
1 parent 28e482af14
commit 34dc4dabce
7 files changed
+9 -9

No files matched your search

+2 -2
View File
@@ -334,13 +334,13 @@ func (fwd *overlaySwitchForwarder) healthCheck(index int, healthy bool) {
fwd.lock.Lock()
defer fwd.lock.Unlock()
if healthy == true && fwd.forwarders[index].onHold {
if healthy && fwd.forwarders[index].onHold {
log.Debug(fwd.logPrefix(), "Adding "+fwd.forwarders[index].overlayName+" to the list of forwarders")
fwd.forwarders[index].onHold = false
fwd.chooseBest()
}
if healthy == false && !fwd.forwarders[index].onHold {
if !healthy && !fwd.forwarders[index].onHold {
log.Debug(fwd.logPrefix(), "Removing "+fwd.forwarders[index].overlayName+" from the list of forwarders")
fwd.forwarders[index].onHold = true
fwd.chooseBest()
+1 -1
View File
@@ -147,7 +147,7 @@ func (p *Pcap) sniff(readHandle *pcap.Handle, consumer Consumer) {
// in order to prevent the next capture from
// overwriting the data
pktLen := len(pkt)
pktCopy := make([]byte, pktLen, pktLen)
pktCopy := make([]byte, pktLen)
copy(pktCopy, pkt)
fop.Process(pktCopy, dec, false)