mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 18:57:17 -07:00
if block ends with a return statement drop this else and outdent its block
This commit is contained in:
parent
f09125b166
commit
ca42274656
1 changed files with 2 additions and 4 deletions
|
@ -148,9 +148,8 @@ func (s *Session) sleepHandler(args []string, sess *Session) error {
|
|||
if secs, err := strconv.Atoi(args[0]); err == nil {
|
||||
time.Sleep(time.Duration(secs) * time.Second)
|
||||
return nil
|
||||
} else {
|
||||
return err
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *Session) getHandler(args []string, sess *Session) error {
|
||||
|
@ -257,9 +256,8 @@ func (s *Session) aliasHandler(args []string, sess *Session) error {
|
|||
|
||||
if s.Lan.SetAliasFor(mac, alias) {
|
||||
return nil
|
||||
} else {
|
||||
return fmt.Errorf("Could not find endpoint %s", mac)
|
||||
}
|
||||
return fmt.Errorf("Could not find endpoint %s", mac)
|
||||
}
|
||||
|
||||
func (s *Session) addHandler(h CommandHandler, c *readline.PrefixCompleter) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue