Skip to content

Commit

Permalink
docs: fix example (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-deangelis authored Feb 7, 2025
1 parent 8970cd9 commit eb64c2d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func main() {
"firstname": "Zog", // Note we are using "firstname" here as specified in the struct tag
"age": "", // won't return an error because fields are optional by default
}
errsMap := schema.Parse(m, &u)
errsMap := userSchema.Parse(m, &u)
if errsMap != nil {
// handle errors -> see Errors section
}
Expand All @@ -102,7 +102,7 @@ func main() {
Name: "Zog",
Age: 1,
}
errsMap := schema.Validate(&u)
errsMap := userSchema.Validate(&u)
if errsMap != nil {
// handle errors -> see Errors section
}
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func main() {
"firstname": "Zog", // Note we are using "firstname" here as specified in the struct tag
"age": "", // won't return an error because fields are optional by default
}
errsMap := schema.Parse(m, &u)
errsMap := userSchema.Parse(m, &u)
if errsMap != nil {
// handle errors -> see Errors section
}
Expand All @@ -62,7 +62,7 @@ func main() {
Name: "Zog",
Age: 1,
}
errsMap := schema.Validate(&u)
errsMap := userSchema.Validate(&u)
if errsMap != nil {
// handle errors -> see Errors section
}
Expand Down

0 comments on commit eb64c2d

Please sign in to comment.