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

This commit is contained in:
evilsocket 2018-03-28 19:49:46 +02:00
commit 39ed078204
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
3 changed files with 9 additions and 18 deletions

View file

@ -3,15 +3,9 @@
package modules
import (
"errors"
"github.com/bettercap/bettercap/session"
)
var (
notSupported = errors.New("ble.recon is not supported on this OS")
)
type BLERecon struct {
session.SessionModule
}
@ -35,13 +29,13 @@ func NewBLERecon(s *session.Session) *BLERecon {
d.AddHandler(session.NewModuleHandler("ble.recon on", "",
"Start Bluetooth Low Energy devices discovery.",
func(args []string) error {
return notSupported
return session.ErrNotSupported
}))
d.AddHandler(session.NewModuleHandler("ble.recon off", "",
"Stop Bluetooth Low Energy devices discovery.",
func(args []string) error {
return notSupported
return session.ErrNotSupported
}))
return d
@ -60,13 +54,13 @@ func (d BLERecon) Author() string {
}
func (d *BLERecon) Configure() (err error) {
return notSupported
return session.ErrNotSupported
}
func (d *BLERecon) Start() error {
return notSupported
return session.ErrNotSupported
}
func (d *BLERecon) Stop() error {
return notSupported
return session.ErrNotSupported
}