From 8c8a13fdc2897eba6b4ab13644e9ee8de183cb8d Mon Sep 17 00:00:00 2001 From: Dan Walsh Date: Fri, 14 Apr 2017 06:09:23 -0400 Subject: [PATCH] Small cleanup on buildah rmi to make code cleaner While adding rmi to ocid, I was asked to make this change, so want to keep the code in buildah and ocid for these functions as close as possible to the same. Signed-off-by: Dan Walsh Closes: #69 Approved by: nalind --- cmd/buildah/images.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/cmd/buildah/images.go b/cmd/buildah/images.go index fd2445a8d..6f6dbafb9 100644 --- a/cmd/buildah/images.go +++ b/cmd/buildah/images.go @@ -65,17 +65,17 @@ func imagesCmd(c *cli.Context) error { for _, image := range images { if quiet { fmt.Printf("%s\n", image.ID) - } else { - names := []string{""} - if len(image.Names) > 0 { - names = image.Names - } - for _, name := range names { - if truncate { - fmt.Printf("%-12.12s %s\n", image.ID, name) - } else { - fmt.Printf("%-64s %s\n", image.ID, name) - } + continue + } + names := []string{""} + if len(image.Names) > 0 { + names = image.Names + } + for _, name := range names { + if truncate { + fmt.Printf("%-12.12s %s\n", image.ID, name) + } else { + fmt.Printf("%-64s %s\n", image.ID, name) } } }