mirror of
https://github.com/gin-gonic/gin.git
synced 2025-04-06 03:57:46 +08:00
19 lines
318 B
Go
19 lines
318 B
Go
package errorparser
|
|
|
|
func ParseBindError(err error) (errs []ParseError, match bool) {
|
|
|
|
if errs, ok := parseValidatorError(err); ok {
|
|
return errs, true
|
|
}
|
|
|
|
if errs, ok := parseJsonDecodeError(err); ok {
|
|
return errs, true
|
|
}
|
|
|
|
// todo: protobuf
|
|
// todo: xml
|
|
// todo: yaml
|
|
|
|
return nil, false
|
|
}
|