Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Matt Toohey <[email protected]>
  • Loading branch information
stuartwdouglas and matt2e committed Aug 30, 2024
1 parent af2adf2 commit ecadc06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/content/docs/reference/fsm.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ An example of creating an FSM instance and then transitioning it through it's st

```go
err := payment.Send(ctx, invoiceID, Invoice {Amount: 110})
err = payment.Send(ctx, invoiceID, Recipt {Amount: 110})
err = payment.Send(ctx, invoiceID, Receipt {Amount: 110})
```

When an event is sent to the FSM the method to be called is determined by matching the current state and event payload
Expand All @@ -68,7 +68,7 @@ state. This means when a method is invoked it always moves to the corresponding

```go
err := payment.Send(ctx, invoiceID, Invoice {Amount: 110})
err = payment.Send(ctx, invoiceID, Recipt {Amount: 20})
err = payment.Send(ctx, invoiceID, Receipt {Amount: 20})
```

In this case it would still moved to the `Paid` state even though the customer only paid 20 of the 110.
Expand Down

0 comments on commit ecadc06

Please sign in to comment.