refact: renamed package net to network to avoid collision with golang net package.

This commit is contained in:
evilsocket 2018-02-15 21:34:46 +01:00
commit 48d27f274a
28 changed files with 298 additions and 298 deletions

View file

@ -1,12 +1,12 @@
package modules
import (
"github.com/evilsocket/bettercap-ng/net"
"github.com/evilsocket/bettercap-ng/network"
"github.com/evilsocket/bettercap-ng/packets"
"github.com/evilsocket/bettercap-ng/session"
)
type ByAddressSorter []*net.Endpoint
type ByAddressSorter []*network.Endpoint
func (a ByAddressSorter) Len() int { return len(a) }
func (a ByAddressSorter) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
@ -17,13 +17,13 @@ func (a ByAddressSorter) Less(i, j int) bool {
return a[i].IpAddressUint32 < a[j].IpAddressUint32
}
type BySeenSorter []*net.Endpoint
type BySeenSorter []*network.Endpoint
func (a BySeenSorter) Len() int { return len(a) }
func (a BySeenSorter) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
func (a BySeenSorter) Less(i, j int) bool { return a[i].LastSeen.After(a[j].LastSeen) }
type BySentSorter []*net.Endpoint
type BySentSorter []*network.Endpoint
func (a BySentSorter) Len() int { return len(a) }
func (a BySentSorter) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
@ -46,7 +46,7 @@ func (a BySentSorter) Less(i, j int) bool {
return bTraffic.Sent < aTraffic.Sent
}
type ByRcvdSorter []*net.Endpoint
type ByRcvdSorter []*network.Endpoint
func (a ByRcvdSorter) Len() int { return len(a) }
func (a ByRcvdSorter) Swap(i, j int) { a[i], a[j] = a[j], a[i] }