Came up here while I was considering adding yet another option to the testutil Generate* functions. I can imagine the number of options increasing as use cases expand, and I don't want to keep on adding arguments and breaking API.
We could wind back and add an Options pattern but I think I'd like to go with a more fluent style API to build a configuration and then execute it:
data := unixfs.Dir(t, lsys).
TargetSize(1<<20).
Sharded().
NoDuplicates().
Generate()
Came up here while I was considering adding yet another option to the testutil
Generate*
functions. I can imagine the number of options increasing as use cases expand, and I don't want to keep on adding arguments and breaking API.We could wind back and add an
Options
pattern but I think I'd like to go with a more fluent style API to build a configuration and then execute it: