title: Represent DDD domain model with Golang
body: <p>I've been looking at various examples of implementing DDD with Go, from the articles at <a href="https://blog.ompluscator.com/" rel="nofollow noreferrer">https://blog.ompluscator.com/</a> to the Three Dots Labs implementation of LiteDDD (<a href="https://threedots.tech/" rel="nofollow noreferrer">https://threedots.tech/</a>), but I still have the same hesitates when it comes to representing the domain logic with Golang, rather when it comes to encapsulating the Value Objects. That is, one of the main functions of Value Objects is to have a structure that complies with certain validations, for example the Email (it has to comply with a regular expression), or a Name (which could have a lenght of N). Now, this with Go is difficult, since structs can always be declared as empty, I will always be able to define an Email {}, or a Name {}, so my Value Objects and even my Entities, do not represent structures completely valid.</p>
  <p>The solutions I have found are helper methods on structures like (IsZero or IsValid). But this leads to having to ask everywhere if Email.IsValid (), Name.IsValid ().</p>
  <p>So if you can share your approach will be nice.</p>