Closed blaggacao closed 3 years ago
It also would buy us evasion of another specialty implementation for #11
Hey @blaggacao. We use the structs approach for type safety in the domain. While your example works in a similar way, you can't prevent someone from passing UserType("any-string")
as UserType
argument. With the current approach, you can't set the unexported struct field from outside the package.
@m110 Thank you very much for the context!
What would be wrong with this approach? — it looks a bit more concise