Documentation
¶
Overview ¶
This has the same logic as the http-inline example but it has implemented validator.Validator and as such requests can be checked in a single place. In this case, in a ParseRequest function will decode the json responses and check that the request is a validator.
If it is, the validator will be evaluated and if a failure is found ie if Err() returns a non nil response, an error is returned.
As is shown, this can then be checked in an error handler and a response created and returned.
Click to show internal directories.
Click to hide internal directories.