mirror of
https://github.com/foomo/gotsrpc.git
synced 2025-10-16 12:35:35 +00:00
20 lines
267 B
Go
20 lines
267 B
Go
package gotsrpc
|
|
|
|
type ClientError struct {
|
|
error
|
|
}
|
|
|
|
func NewClientError(err error) *ClientError {
|
|
return &ClientError{
|
|
error: err,
|
|
}
|
|
}
|
|
|
|
// Unwrap interface
|
|
func (e *ClientError) Unwrap() error {
|
|
if e != nil && e.error != nil {
|
|
return e.error
|
|
}
|
|
return nil
|
|
}
|