Revert "Minor refactors using golint"

This commit is contained in:
Simone Margaritelli 2018-05-03 12:31:42 +02:00 committed by GitHub
commit 5328ced392
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 101 additions and 70 deletions

View file

@ -148,8 +148,9 @@ 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 {
@ -256,8 +257,9 @@ 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) {