mirror of
https://github.com/smallnest/rpcx.git
synced 2025-10-28 10:21:30 +08:00
add server plugins feature and add zookeeper/etcd/consul registries
This commit is contained in:
18
errors/error.go
Normal file
18
errors/error.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package errors
|
||||
|
||||
import "fmt"
|
||||
|
||||
// MultiError holds multiple errors
|
||||
type MultiError struct {
|
||||
Errors []error
|
||||
}
|
||||
|
||||
// Error returns the message of the actual error
|
||||
func (e *MultiError) Error() string {
|
||||
return fmt.Sprintf("%v", e.Errors)
|
||||
}
|
||||
|
||||
// NewMultiError creates and returns an Error with error splice
|
||||
func NewMultiError(errors []error) *MultiError {
|
||||
return &MultiError{Errors: errors}
|
||||
}
|
||||
Reference in New Issue
Block a user