caplets: Swap Error Returns

This commit is contained in:
Lars Lehtonen 2019-11-13 15:39:20 -08:00
commit 07459424fb
No known key found for this signature in database
GPG key ID: 8137D474EBCB04F2
2 changed files with 8 additions and 9 deletions

View file

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