Skip to content

Commit ab6573c

Browse files
Apply suggestions from code review
Co-Authored-By: boekkooi-fresh <[email protected]>
1 parent f61da8a commit ab6573c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

docs/quick-start.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ func main() {
264264
// ...
265265
ctx := context.Background()
266266

267-
myFirstBankAccount, err := OpenBankAccount()
267+
myFirstBankAccount, err := OpenBankAccount()
268268
if err != nil {
269269
panic(err)
270270
}
@@ -368,7 +368,7 @@ func main() {
368368
}
369369
}
370370
```
371-
*In production environments it's a good idea to run any projection separate from the main application*
371+
*In production environments it's a good idea to run any projection separate from the main application, such as having a separated application binary only responsible for running the projections.*
372372

373373
[repo]: https://github.com/hellofresh/goengine
374374
[aggregate repository]: https://github.com/hellofresh/goengine/tree/master/aggregate/repository.go

example/aggregate/main.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ type (
4040
)
4141

4242
func main() {
43-
account, _ := OpenBankAccount()
43+
account, err := OpenBankAccount()
44+
if err != nil {
45+
panic(err)
46+
}
4447
account.Deposit(100)
4548
account.Withdraw(10)
4649
account.Withdraw(20)

0 commit comments

Comments
 (0)