Skip to content

Commit

Permalink
doc/Invoke: Clearer "success indicator" wording for errors (#840)
Browse files Browse the repository at this point in the history
A user was confused by the wording,

> If the final returned object is an error,
> it's assumed to be a success indicator.

They reasonably expect that an error is an indicator of failure.

Clarify the sentence to make it clear that the error indicates *whether*
the operation was successful.
  • Loading branch information
abhinav committed Feb 15, 2022
1 parent b2c4636 commit 5505874
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions invoke.go
Expand Up @@ -33,8 +33,9 @@ import (
// the application's existing list.
//
// Unlike constructors, invocations are always executed, and they're always
// run in order. Invocations may have any number of returned values. If the
// final returned object is an error, it's assumed to be a success indicator.
// run in order. Invocations may have any number of returned values.
// If the final returned object is an error, it indicates whether the operation
// was successful.
// All other returned values are discarded.
//
// Typically, invoked functions take a handful of high-level objects (whose
Expand Down

0 comments on commit 5505874

Please sign in to comment.