Why do you have the builder pattern (other than the verbosity of declaring them)?
I normally just leverage a couple of features: Derive(default) to have an "empty" initialized value and the struct field filling syntax
let x = Foo { field_i_care_about, ..Default::default() };In Go, you can use an interface to implement private struct fields. Then you can make a "New" function to implement default values as needed. I made a post about this last month:
1: https://dave.cheney.net/2014/10/17/functional-options-for-fr...