1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-07-02 12:20:03 +08:00

commands: Made Response#Error return an *Error instead of an error

This commit is contained in:
Matt Bell
2014-10-22 15:43:24 -07:00
committed by Juan Batiz-Benet
parent 60ef8e5e8c
commit 19e5fbae70

View File

@ -54,7 +54,7 @@ type Response interface {
// Set/Return the response Error // Set/Return the response Error
SetError(err error, code ErrorType) SetError(err error, code ErrorType)
Error() error Error() *Error
// Sets/Returns the response value // Sets/Returns the response value
SetValue(interface{}) SetValue(interface{})
@ -88,10 +88,7 @@ func (r *response) Stream() io.Writer {
return r.out return r.out
} }
func (r *response) Error() error { func (r *response) Error() *Error {
if r.err == nil {
return nil
}
return r.err return r.err
} }