Skip to content

Commit

Permalink
Add comments to README
Browse files Browse the repository at this point in the history
  • Loading branch information
muesli committed May 1, 2020
1 parent 5791d59 commit a4eb4f3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -25,6 +25,8 @@ type User struct {
Admin bool
}

// make sure the struct's fields share the name and type
// of the structs you want to generate
type UserTests struct {
Name []string
Age []uint
Expand All @@ -38,6 +40,7 @@ testData := UserTests{
Admin: []bool{false, true},
}

// generate all possible combinations
var users []User
combinator.Generate(&users, testData)
for i, u := range users {
Expand Down

0 comments on commit a4eb4f3

Please sign in to comment.