mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 13:09:49 -07:00
if block ends with a return statement drop this else and outdent its block
This commit is contained in:
parent
024f978c3a
commit
d65bee06ce
1 changed files with 2 additions and 4 deletions
|
@ -40,9 +40,8 @@ func NewWOL(s *session.Session) *WOL {
|
||||||
func(args []string) error {
|
func(args []string) error {
|
||||||
if mac, err := parseMAC(args); err != nil {
|
if mac, err := parseMAC(args); err != nil {
|
||||||
return err
|
return err
|
||||||
} else {
|
|
||||||
return w.wolUDP(mac)
|
|
||||||
}
|
}
|
||||||
|
return w.wolUDP(mac)
|
||||||
}))
|
}))
|
||||||
|
|
||||||
return w
|
return w
|
||||||
|
@ -55,9 +54,8 @@ func parseMAC(args []string) (string, error) {
|
||||||
if tmp != "" {
|
if tmp != "" {
|
||||||
if !reMAC.MatchString(tmp) {
|
if !reMAC.MatchString(tmp) {
|
||||||
return "", fmt.Errorf("%s is not a valid MAC address.", tmp)
|
return "", fmt.Errorf("%s is not a valid MAC address.", tmp)
|
||||||
} else {
|
|
||||||
mac = tmp
|
|
||||||
}
|
}
|
||||||
|
mac = tmp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue