PacktPublishing / Event-Driven-Architecture-in-Golang

Event-Driven Architecture in Golang, published by Packt
MIT License
336 stars 105 forks source link

Chapter 5 - Events not cleared after calling ClearEvents() on ddd.Aggregate #3

Closed KaFski closed 1 year ago

KaFski commented 1 year ago

Since ClearEvents() method on ddd.Aggregate has a value receiver, the aggregate events won't be cleared after calling that method.

https://github.com/PacktPublishing/Event-Driven-Architecture-in-Golang/blob/11afd504fd8f0834b4b4353048dc0920303bbddf/Chapter05/internal/ddd/aggregate.go#L51