if block ends with a return statement drop this else and outdent its block

This commit is contained in:
Kent Gruber 2018-05-01 23:13:33 -04:00
commit d65bee06ce

View file

@ -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
}
}