modernice / goes

goes is an event-sourcing framework for Go.
https://goes.modernice.dev
Apache License 2.0
134 stars 12 forks source link

Return copy of slice #155

Closed bounoable closed 1 year ago

bounoable commented 1 year ago

The caller shouldn't be able to modify underlying array of the internal insertedEvents slice:

https://github.com/modernice/goes/blob/875903b43ae7ae6237efd5d1b1ac556c67ad91c9/backend/mongo/transaction.go#L56

rafiramadhana commented 1 year ago

hi @bounoable can I work on this? thanks

bounoable commented 1 year ago

hey @rafiramadhana, that would be nice 👍🏼

bounoable commented 1 year ago

oh, seems like someone already did 😄