mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-01 02:30:39 +08:00
commands: Return a reader in a Response#Reader method, instead of making Response implementing io.Reader
This commit is contained in:

committed by
Juan Batiz-Benet

parent
15cd24a6d1
commit
39a60e7f1d
@ -117,10 +117,13 @@ func main() {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
_, err = io.Copy(os.Stdout, res)
|
||||
out, err := res.Reader()
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
io.Copy(os.Stdout, out)
|
||||
}
|
||||
|
||||
func getOptions(req cmds.Request, root *cmds.Command) (cmds.Request, error) {
|
||||
|
Reference in New Issue
Block a user