Tons of unit tests
This commit is contained in:
@ -50,3 +50,10 @@ func Default(method, contentType string) Binding {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func Validate(obj interface{}) error {
|
||||
if err := _validator.ValidateStruct(obj); err != nil {
|
||||
return error(err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user