Very interesting.<p>I see what might be a problem, however: determining the difference between a zero-value in a struct that was supplied intentionally, or one that was left unspecified.<p>To clarify what I mean, in the example on that page the following line doesn't produce the right answer:<p><pre><code> p := defaults.NewWithDefaults(Person{ConvictedFelon: false}).(Person)
</code></pre>
Of course, you could perform the assignment after the defaults have been initialized, but then you're giving up the optional struct initialization that Go provides. I'll have to think about how you could solve this. In the meanwhile, I'll open an issue on Github.