moby/cli
Yong Tang 32de162fc9 Improve error output for docker stats ...
While looking into `docker stats <c1> <c2> ...` I noticed that
the error output is quite long, especially if there are multiple errors:
```sh
ubuntu@ubuntu:~/docker$ docker stats nofound
: Error response from daemon: No such container: nofound
ubuntu@ubuntu:~/docker$ docker stats nofound foo bar
: Error response from daemon: No such container: nofound, : Error response from daemon: No such container: foo, : Error response from daemon: No such container: bar
```

There are several issues,
1. There is an extra `: ` at the beginning. That is because if container is not found,
the name will not be available from the daemon.
2. Multiple errors are concatenated with `, ` which will be quite long.

This fix:
1. Only prient out the error from daemon.
2. Multiple errors are printed out line by line.

Below is the new output:
```sh
ubuntu@ubuntu:~/docker$ docker stats nofound
Error response from daemon: No such container: nofound
ubuntu@ubuntu:~/docker$ docker stats nofound foo bar
Error response from daemon: No such container: nofound
Error response from daemon: No such container: foo
Error response from daemon: No such container: bar
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-12-17 16:51:11 -08:00
..
command Improve error output for docker stats ... 2016-12-17 16:51:11 -08:00
compose/convert Move pkg to cli/compose/convert 2016-12-16 12:27:31 -05:00
flags Add for String 2016-11-03 16:15:26 +08:00
trust cli: Split out GetNotaryRepository and associated functions 2016-12-14 10:49:32 -08:00
cobra.go exit with status 1 if help is called on an invalid command. 2016-11-23 15:13:58 -05:00
error.go Remove old cli framework. 2016-08-25 13:09:04 -04:00
required.go fix typos 2016-07-05 20:42:17 +08:00