Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
guiferpa authored Jul 28, 2024
1 parent d57d0a3 commit 271058a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ func HTTPHandler(v *gody.Validator) http.HandlerFunc {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
var body RequestBody
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
...
// ...
}
defer r.Body.Close()

if isValidated, err := v.Validate(body); err != nil {
...
// ...
}
})
}
Expand Down

0 comments on commit 271058a

Please sign in to comment.