diff --git a/slides.md b/slides.md index 8fca6fb..a13e654 100644 --- a/slides.md +++ b/slides.md @@ -541,9 +541,9 @@ func DecodeAndValidateJSON(r *http.Request, target Validator) error { return nil } +``` -... - +```go var foo FooRequest if err := DecodeAndValidateJSON(r, &foo); err != nil { http.Error(w, err.Error(), http.StatusInternalServerError)