Skip to content

Commit

Permalink
Add note about limitation of Make for recursive types
Browse files Browse the repository at this point in the history
See #67.
  • Loading branch information
flyingmutant committed Jun 6, 2024
1 parent 654675a commit 3aa554a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions make.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import (
)

// Make creates a generator of values of type V, using reflection to infer the required structure.
// Currently, Make may be unable to terminate generation of values of some recursive types, thus using
// Make with recursive types requires extra care.
func Make[V any]() *Generator[V] {
var zero V
gen := newMakeGen(reflect.TypeOf(zero))
Expand Down

0 comments on commit 3aa554a

Please sign in to comment.