Export error field in ErrEventReceived
This will allow to reuse the error in other packages and compare it in assert.Equal unit-tests and similar Change-Id: Iccc6df713cedb78f6e75f7fba8d317bfcc6e8e84
This commit is contained in:
parent
a8bdae6c9a
commit
d37f13b6cb
@ -20,10 +20,10 @@ import (
|
|||||||
|
|
||||||
// ErrEventReceived returned for not implemented features
|
// ErrEventReceived returned for not implemented features
|
||||||
type ErrEventReceived struct {
|
type ErrEventReceived struct {
|
||||||
errors []error
|
Errors []error
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e ErrEventReceived) Error() string {
|
func (e ErrEventReceived) Error() string {
|
||||||
// TODO make printing more readable here
|
// TODO make printing more readable here
|
||||||
return fmt.Sprintf("Applying of resources to kubernetes cluster has failed, errors are:\n%v", e.errors)
|
return fmt.Sprintf("Applying of resources to kubernetes cluster has failed, errors are:\n%v", e.Errors)
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,7 @@ func (p *DefaultProcessor) processApplierEvent(e applyevent.Event) {
|
|||||||
func checkErrors(errs []error) error {
|
func checkErrors(errs []error) error {
|
||||||
if len(errs) != 0 {
|
if len(errs) != 0 {
|
||||||
return ErrEventReceived{
|
return ErrEventReceived{
|
||||||
errors: errs,
|
Errors: errs,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user