3 ms·
They can’t because value is not exported. They must use the NewUsername function, which forces the validation. In my opinion, this pattern breaks when the vali
by iampims 3y ago
They can’t because value is not exported. They must use the NewUsername function, which forces the validation.
In my opinion, this pattern breaks when the validation must return an error and everything becomes very verbose.
- asp_hornet 3y agoOh, thats true about it being unexported. I hadn’t considered that.