summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorQi Wang <qiwan@redhat.com>2018-11-12 14:05:15 -0500
committerQi Wang <qiwan@redhat.com>2018-11-12 14:06:31 -0500
commitb6fabf1d214f7ec0694bd642f879c2afaa037fa7 (patch)
tree543671c7816ddb24602a83bc3a1bfc93cb51d885 /cmd/podman
parent78e6d8e7d70d431ccf096dee0f8eadb1c9b2967b (diff)
downloadpodman-b6fabf1d214f7ec0694bd642f879c2afaa037fa7.tar.gz
podman-b6fabf1d214f7ec0694bd642f879c2afaa037fa7.tar.bz2
podman-b6fabf1d214f7ec0694bd642f879c2afaa037fa7.zip
Add space between num & unit in images output
Signed-off-by: Qi Wang <qiwan@redhat.com>
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/images.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd/podman/images.go b/cmd/podman/images.go
index a8955e49e..c52b26260 100644
--- a/cmd/podman/images.go
+++ b/cmd/podman/images.go
@@ -6,8 +6,7 @@ import (
"sort"
"strings"
"time"
-
- "github.com/sirupsen/logrus"
+ "unicode"
"github.com/containers/libpod/cmd/podman/formats"
"github.com/containers/libpod/cmd/podman/libpodruntime"
@@ -16,6 +15,7 @@ import (
"github.com/docker/go-units"
digest "github.com/opencontainers/go-digest"
"github.com/pkg/errors"
+ "github.com/sirupsen/logrus"
"github.com/urfave/cli"
)
@@ -289,6 +289,8 @@ func getImagesTemplateOutput(ctx context.Context, runtime *libpod.Runtime, image
sizeStr = err.Error()
} else {
sizeStr = units.HumanSizeWithPrecision(float64(*size), 3)
+ lastNumIdx := strings.LastIndexFunc(sizeStr, unicode.IsNumber)
+ sizeStr = sizeStr[:lastNumIdx+1] + " " + sizeStr[lastNumIdx+1:]
}
params := imagesTemplateParams{
Repository: repo,