18 lines
276 B
Go
18 lines
276 B
Go
|
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
|
||
|
}
|