mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -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 {
|
||||
if mac, err := parseMAC(args); err != nil {
|
||||
return err
|
||||
} else {
|
||||
return w.wolUDP(mac)
|
||||
}
|
||||
return w.wolUDP(mac)
|
||||
}))
|
||||
|
||||
return w
|
||||
|
@ -55,9 +54,8 @@ func parseMAC(args []string) (string, error) {
|
|||
if tmp != "" {
|
||||
if !reMAC.MatchString(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