1
0
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:
Matt Bell
2014-10-21 16:15:06 -07:00
parent b65a5bacbe
commit dd84a3eb44
2 changed files with 4 additions and 9 deletions

View File

@ -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}
}