How not to pollute domain model with persistence layer artifacts when practicing DDD in Golang?
<p>I'm practicing DDD using Golang and do not want to pollute my model with persistence artifacts like bson tags, neither with json tags that has to do with encoding/decoding data coming from endpoints.  </p>

<p>What is an elegant way of achieving that without having to define structs in three places?</p>

<p>I have gotten as far as to embed my model in a persistence layer version of my model, which wraps the model and adds a mongo-specific ID field, but the embedding means that i have to put my mongo tags in my model definitions and I'm faced with the same problem for my structs for enc/dec of my endpoints.</p>