Ultimo commit pre-talk

This commit is contained in:
2023-04-02 01:55:53 +02:00
parent 08e946fdba
commit c80b23c93d
+2 -2
View File
@@ -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)