1
0
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:
Darren Shepherd
2018-03-03 21:45:18 -07:00
parent de91ccaa71
commit 1e9982bd45
2 changed files with 3 additions and 3 deletions

View File

@@ -215,7 +215,7 @@ func (g *genericController) syncHandler(s string) (err error) {
})
}
}
err = types.NewErrors(errs)
err = types.NewErrors(errs...)
return
}

View File

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