prometheus/vendor/github.com/asaskevich/govalidator/error.go

25 lines
329 B
Go
Raw Normal View History

2016-01-24 21:30:04 -08:00
package govalidator
type Errors []error
func (es Errors) Errors() []error {
return es
}
func (es Errors) Error() string {
var err string
for _, e := range es {
err += e.Error() + ";"
}
return err
}
type Error struct {
Name string
Err error
}
func (e Error) Error() string {
return e.Name + ": " + e.Err.Error()
}