Documentation
¶
Index ¶
- func DefaultDelimiter() string
- func SetDefaultDelimiter(s string)
- type MultiErrors
- func (e *MultiErrors) Add(errs ...error)
- func (e *MultiErrors) As(target interface{}) bool
- func (e *MultiErrors) Delimiter() string
- func (e *MultiErrors) Each(fn func(int, error))
- func (e *MultiErrors) Error() string
- func (e *MultiErrors) Errors() []error
- func (e *MultiErrors) Filter(fn func(int, error) bool) *MultiErrors
- func (e *MultiErrors) Is(target error) bool
- func (e *MultiErrors) Length() int
- func (e *MultiErrors) SetDelimiter(del string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultDelimiter ¶
func DefaultDelimiter() string
DefaultDelimiter is the getter of default delimiter
func SetDefaultDelimiter ¶
func SetDefaultDelimiter(s string)
SetDefaultDelimiter is the setter of default delimiter
Types ¶
type MultiErrors ¶
type MultiErrors struct {
// contains filtered or unexported fields
}
MultiErrors has multiple errors and can be used as an error
func (*MultiErrors) Delimiter ¶
func (e *MultiErrors) Delimiter() string
Delimiter is the getter of delimiter
func (*MultiErrors) Error ¶
func (e *MultiErrors) Error() string
Error is the implementation of interface error
func (*MultiErrors) Errors ¶
func (e *MultiErrors) Errors() []error
Errors returns a copy of the internal error slice
func (*MultiErrors) Filter ¶
func (e *MultiErrors) Filter(fn func(int, error) bool) *MultiErrors
Filter returns new MultiErrors created with multiple errors that pass the condition
func (*MultiErrors) SetDelimiter ¶
func (e *MultiErrors) SetDelimiter(del string)
SetDelimiter is the setter of delimiter
Click to show internal directories.
Click to hide internal directories.