Here's a piece of code I've written, in some form, at three different companies: func ( s * ProductService ) CreateProduct ( ctx context . Context , cmd CreateProduct ) error { product := entities . NewProduct ( cmd .
Source: [Dev.to](https://dev.to/sklinkert/the-dual-write-bug-you-probably-have-in-production-and-the-outbox-pattern-that-fixes-it-53ee)