Skip to content

More extensible and configurable test data generator interface #49

@rvagg

Description

@rvagg

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()

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions