mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-02 12:20:03 +08:00
commands: Got rid of Response#Stream() in favor of setting value to a io.Reader
This commit is contained in:
@ -60,9 +60,6 @@ type Response interface {
|
||||
SetValue(interface{})
|
||||
Value() interface{}
|
||||
|
||||
// Returns the output stream Writer
|
||||
Stream() io.Writer
|
||||
|
||||
// Marshal marshals out the response into a buffer. It uses the EncodingType
|
||||
// on the Request to chose a Marshaller (Codec).
|
||||
Marshal() ([]byte, error)
|
||||
@ -125,6 +122,6 @@ func (r *response) Marshal() ([]byte, error) {
|
||||
}
|
||||
|
||||
// NewResponse returns a response to match given Request
|
||||
func NewResponse(req Request, out io.Writer) Response {
|
||||
return &response{req: req, out: out}
|
||||
func NewResponse(req Request) Response {
|
||||
return &response{req: req}
|
||||
}
|
||||
|
Reference in New Issue
Block a user