mirror of
https://github.com/rancher/norman.git
synced 2025-09-04 08:45:22 +00:00
Change NewErrors signature
This commit is contained in:
@@ -215,7 +215,7 @@ func (g *genericController) syncHandler(s string) (err error) {
|
||||
})
|
||||
}
|
||||
}
|
||||
err = types.NewErrors(errs)
|
||||
err = types.NewErrors(errs...)
|
||||
return
|
||||
}
|
||||
|
||||
|
@@ -57,7 +57,7 @@ func (s *Schemas) Init(initFunc SchemasInitFunc) *Schemas {
|
||||
}
|
||||
|
||||
func (s *Schemas) Err() error {
|
||||
return NewErrors(s.errors)
|
||||
return NewErrors(s.errors...)
|
||||
}
|
||||
|
||||
func (s *Schemas) AddSchemas(schema *Schemas) *Schemas {
|
||||
@@ -343,7 +343,7 @@ type multiErrors struct {
|
||||
errors []error
|
||||
}
|
||||
|
||||
func NewErrors(errors []error) error {
|
||||
func NewErrors(errors ...error) error {
|
||||
if len(errors) == 0 {
|
||||
return nil
|
||||
} else if len(errors) == 1 {
|
||||
|
Reference in New Issue
Block a user