Tons of unit tests

This commit is contained in:
Manu Mtz-Almeida
2015-04-09 12:15:02 +02:00
parent ac1ee3fb86
commit 0a192fb0fa
26 changed files with 1477 additions and 86 deletions

View File

@ -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
}