Skip to content

Commit cd2c922

Browse files
author
Guy Baron
authored
documentation fixes (#228)
1 parent 7d2220c commit cd2c922

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

docs/LOGGING.md

-2
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ func placeOrder(customerID string, lineItems LineItems[]) error{
9090

9191
```
9292

93-
94-
9593
### Setting a custom logger instance
9694

9795
grabbit will create a default instance of logrus FieldLogger if no such logger is set when the bus is created.

examples/vacation_app/cmd/flights.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"os"
77
"vacation_app/messages"
88
"vacation_app/trace"
9-
9+
1010
log "github.com/sirupsen/logrus"
1111
"github.com/spf13/cobra"
1212
"github.com/wework/grabbit/gbus"

examples/vacation_app/saga/booking_saga.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func (bs *BookingSaga) HandleBookFlightsRsp(invocation gbus.Invocation, message
6161
if bs.CancelingFlights == false {
6262
bs.FinishedWithFlights = true
6363
}
64-
return bs.notifyInitiatorIfSagaComplets(true, invocation.Ctx(), invocation)
64+
return bs.notifyInitiatorIfSagaCompletes(true, invocation.Ctx(), invocation)
6565
}
6666

6767
func (bs *BookingSaga) HandleBookHotelRsp(invocation gbus.Invocation, message *gbus.BusMessage) error {
@@ -82,7 +82,7 @@ func (bs *BookingSaga) HandleBookHotelRsp(invocation gbus.Invocation, message *g
8282
return invocation.Bus().Send(invocation.Ctx(), "flights-service", cancelFlightsCmd)
8383
}
8484

85-
return bs.notifyInitiatorIfSagaComplets(true, invocation.Ctx(), invocation)
85+
return bs.notifyInitiatorIfSagaCompletes(true, invocation.Ctx(), invocation)
8686

8787
}
8888

@@ -91,10 +91,10 @@ func (bs *BookingSaga) HandleCancelFlightsRsp(invocation gbus.Invocation, messag
9191
invocation.Log().Infof("flights were canceled ? %t", response.Success)
9292
bs.FinishedWithFlights = true
9393

94-
return bs.notifyInitiatorIfSagaComplets(false, invocation.Ctx(), invocation)
94+
return bs.notifyInitiatorIfSagaCompletes(false, invocation.Ctx(), invocation)
9595
}
9696

97-
func (bs *BookingSaga) notifyInitiatorIfSagaComplets(success bool, ctx context.Context, invocation gbus.Invocation) error {
97+
func (bs *BookingSaga) notifyInitiatorIfSagaCompletes(success bool, ctx context.Context, invocation gbus.Invocation) error {
9898

9999
if bs.IsComplete() {
100100

0 commit comments

Comments
 (0)