The Docker CLI
Go to file
Aaron Lehmann 5b855515e4 Hide zero-valued timestamps from service JSON
It was possible to see output like this:

        "UpdateStatus": {
            "State": "updating",
            "StartedAt": "2017-04-14T17:10:03.226607162Z",
            "CompletedAt": "1970-01-01T00:00:00Z",
            "Message": "update in progress"
        }

The timestamp fields were already changed to pointers, and left nil if
the timestamp value was zero. However the zero-value of a timestamp from
gRPC is different from the value Go considers to be zero. gRPC uses the
Unix epoch instead of Go's epoch. Therefore, check that the timestamp
does not match the Unix epoch.

Also, add " ago" to the timestamps as shown in "docker service inspect
--pretty", as they are shown as relative times.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-04-14 10:44:24 -07:00
command Hide zero-valued timestamps from service JSON 2017-04-14 10:44:24 -07:00
compose Merge pull request #32059 from seriousben/support-dns-stack-file 2017-04-11 21:32:52 +02:00
config Add `label` filter for `docker system prune` 2017-04-06 09:11:25 -07:00
debug Move debug functions to cli/debug package 2016-12-12 09:33:58 +01:00
flags fix the type 2017-02-14 09:54:27 +08:00
internal/test Added unit tests to the cli/command/idresolver package 2017-04-07 23:23:39 -04:00
trust Replace fmt.Errorf() with errors.Errorf() in the cli 2017-03-24 16:58:07 -04:00
cobra.go Replace fmt.Errorf() with errors.Errorf() in the cli 2017-03-24 16:58:07 -04:00
error.go Remove old cli framework. 2016-08-25 13:09:04 -04:00
required.go Replace fmt.Errorf() with errors.Errorf() in the cli 2017-03-24 16:58:07 -04:00