Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MultiError ¶
type MultiError struct {
// contains filtered or unexported fields
}
MultiError is a type to handle multiples errors simultaneously.
func NewMultiError ¶
func NewMultiError() *MultiError
NewMultiError returns a new instance of MultiError type.
func (*MultiError) Append ¶
func (m *MultiError) Append(err error)
Append appends the error with the multierror using the default serverity of Error
func (*MultiError) AppendWithSeverity ¶
func (m *MultiError) AppendWithSeverity(err error, severity Severity)
AppendWithSeverity appends the error with the multierror using the provided severity
func (*MultiError) Error ¶
func (m *MultiError) Error() string
Error is implemented to be categorized as an error.
func (*MultiError) GetError ¶
func (m *MultiError) GetError() error
GetError returns the multi error itself if the severity of any one of the message is error, else it returns nil.
func (*MultiError) HasErrors ¶
func (m *MultiError) HasErrors() bool
HasErrors returns if any of the errors has severity error
func (*MultiError) Severity ¶
func (m *MultiError) Severity() Severity
Severity returns the sevirity of the multierror type by selecting the highest severity among the given.
func (*MultiError) String ¶
func (m *MultiError) String() string
String returns the string representation of multiple errors