mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 05:23:19 -07:00
caplets: Swap Error Returns
This commit is contained in:
parent
63d5ce7118
commit
07459424fb
2 changed files with 8 additions and 9 deletions
|
@ -361,7 +361,7 @@ func (s *Session) ReadLine() (string, error) {
|
|||
}
|
||||
|
||||
func (s *Session) RunCaplet(filename string) error {
|
||||
err, caplet := caplets.Load(filename)
|
||||
caplet, err := caplets.Load(filename)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -382,7 +382,7 @@ func parseCapletCommand(line string) (is bool, caplet *caplets.Caplet, argv []st
|
|||
argv = parts[1:]
|
||||
}
|
||||
|
||||
if err, cap := caplets.Load(file); err == nil {
|
||||
if cap, err := caplets.Load(file); err == nil {
|
||||
return true, cap, argv
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue