mirror of
https://github.com/containers/skopeo.git
synced 2026-07-13 03:40:39 +00:00
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 <dwalsh@redhat.com> Closes: #69 Approved by: nalind
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user