Commit 39a60e7f authored by Matt Bell's avatar Matt Bell Committed by Juan Batiz-Benet

commands: Return a reader in a Response#Reader method, instead of making...

commands: Return a reader in a Response#Reader method, instead of making Response implementing io.Reader
parent 15cd24a6
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment