Add Make method to Generator

This commit is contained in:
Dan Jones 2025-03-15 16:24:37 -05:00
commit 1008a064d0
2 changed files with 19 additions and 0 deletions

View file

@ -26,6 +26,19 @@ func ExampleWithGenerator_customGenerator() {
// hello
}
func ExampleGenerator_Make() {
g := nomino.Incremental()
st, _ := g.Make()
fmt.Println(st)
st, _ = g.Make(nomino.WithPrefix("foo"))
fmt.Println(st)
// Output:
// 0.txt
// foo_1.txt
}
func ExampleMultiGeneratorInOrder() {
gen1 := func(*nomino.Config) (string, error) {
return "hello", nil