misc: small fix or general refactoring i did not bother commenting

This commit is contained in:
evilsocket 2018-02-19 14:36:24 +01:00
commit d95373bfa8
6 changed files with 22 additions and 21 deletions

View file

@ -4,7 +4,7 @@ import (
"github.com/evilsocket/bettercap-ng/network"
)
type ByRSSISorter []*network.WiFiStation
type ByRSSISorter []*network.Station
func (a ByRSSISorter) Len() int { return len(a) }
func (a ByRSSISorter) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
@ -15,7 +15,7 @@ func (a ByRSSISorter) Less(i, j int) bool {
return a[i].RSSI > a[j].RSSI
}
type ByChannelSorter []*network.WiFiStation
type ByChannelSorter []*network.Station
func (a ByChannelSorter) Len() int { return len(a) }
func (a ByChannelSorter) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
@ -26,7 +26,7 @@ func (a ByChannelSorter) Less(i, j int) bool {
return a[i].Channel < a[j].Channel
}
type ByEssidSorter []*network.WiFiStation
type ByEssidSorter []*network.Station
func (a ByEssidSorter) Len() int { return len(a) }
func (a ByEssidSorter) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
@ -37,7 +37,7 @@ func (a ByEssidSorter) Less(i, j int) bool {
return a[i].ESSID() < a[j].ESSID()
}
type ByWiFiSeenSorter []*network.WiFiStation
type ByWiFiSeenSorter []*network.Station
func (a ByWiFiSeenSorter) Len() int { return len(a) }
func (a ByWiFiSeenSorter) Swap(i, j int) { a[i], a[j] = a[j], a[i] }