more lint driven refactoring

This commit is contained in:
evilsocket 2018-04-24 18:26:16 +02:00
commit 0de6f3a76e
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
57 changed files with 168 additions and 241 deletions

View file

@ -88,7 +88,7 @@ func (w *WiFiModule) getRow(station *network.Station) ([]string, bool) {
// method handle both access point and clients
// transparently
clients := ""
if ap, found := w.Session.WiFi.Get(station.HwAddress); found == true {
if ap, found := w.Session.WiFi.Get(station.HwAddress); found {
if ap.NumClients() > 0 {
clients = strconv.Itoa(ap.NumClients())
}
@ -114,7 +114,7 @@ func (w *WiFiModule) Show(by string) error {
apSelected := w.isApSelected()
if apSelected {
if ap, found := w.Session.WiFi.Get(w.ap.HwAddress); found == true {
if ap, found := w.Session.WiFi.Get(w.ap.HwAddress); found {
stations = ap.Clients()
} else {
return fmt.Errorf("Could not find station %s", w.ap.HwAddress)
@ -135,7 +135,7 @@ func (w *WiFiModule) Show(by string) error {
rows := make([][]string, 0)
for _, s := range stations {
if row, include := w.getRow(s); include == true {
if row, include := w.getRow(s); include {
rows = append(rows, row)
}
}