3 ms·
Does that mean you use variadic functions to adapt to different structs and their properties/fields and they all return the same "base struct"? Do you have exa
by cookiengineer 4y ago
Does that mean you use variadic functions to adapt to different structs and their properties/fields and they all return the same "base struct"?
Do you have example code? I am now really curious, but don't know what to google.
- gouggoug 4y agoI think you are looking for “functional options”[0] [0] https://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis https://dave.cheney.net/2014/10/17/functional-options-for-fr...
- bryancoxwell 4y agoOh dear I love that. Thanks for sharing.