|
package hw09structvalidator
|
|
|
|
type ValidationError struct {
|
|
Field string
|
|
Err error
|
|
}
|
|
|
|
type ValidationErrors []ValidationError
|
|
|
|
func (v ValidationErrors) Error() string {
|
|
panic("implement me")
|
|
}
|
|
|
|
func Validate(v interface{}) error {
|
|
// Place your code here.
|
|
return nil
|
|
}
|