mirror of https://github.com/docker/cli.git
9a2f2d769d
Running `docker inspect --format "{{.ID}} {{.Size}}" alpine` prints sha256:651aa95985aa4a17a38ffcf71f598ec461924ca96865facc2c5782ef2d2be07f 3983636 While `docker inspect --format "{{.Id}} {{.Size}}" alpine` prints sha256:651aa95985aa4a17a38ffcf71f598ec461924ca96865facc2c5782ef2d2be07f 3.983636e+06 This happens because "Id" is not a field of types.ImageInspect and thus tryRawInspectFallback is called and converts the raw response into `interface{}` using a JSON decoder. However, by default that decoder converts numbers into `float64` unless `UseNumber` is set. Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com> |
||
---|---|---|
.. | ||
inspector.go | ||
inspector_test.go |