summaryrefslogtreecommitdiff
path: root/cmd/podman/images.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-07-11 05:44:12 -0500
committerbaude <bbaude@redhat.com>2019-07-21 14:22:39 -0500
commitdb826d5d75630cca784bd7092eba5b06601ae27f (patch)
treec60cc844e499d5d57752fdb92d4036ea0487ae3c /cmd/podman/images.go
parenta5aa44c583612e210cf2ba44c3313a2ff27c94da (diff)
downloadpodman-db826d5d75630cca784bd7092eba5b06601ae27f.tar.gz
podman-db826d5d75630cca784bd7092eba5b06601ae27f.tar.bz2
podman-db826d5d75630cca784bd7092eba5b06601ae27f.zip
golangci-lint round #3
this is the third round of preparing to use the golangci-lint on our code base. Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podman/images.go')
-rw-r--r--cmd/podman/images.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/cmd/podman/images.go b/cmd/podman/images.go
index 281d93e71..3b32ee3dd 100644
--- a/cmd/podman/images.go
+++ b/cmd/podman/images.go
@@ -248,7 +248,8 @@ func sortImagesOutput(sortBy string, imagesOutput imagesSorted) imagesSorted {
}
// getImagesTemplateOutput returns the images information to be printed in human readable format
-func getImagesTemplateOutput(ctx context.Context, images []*adapter.ContainerImage, opts imagesOptions) (imagesOutput imagesSorted) {
+func getImagesTemplateOutput(ctx context.Context, images []*adapter.ContainerImage, opts imagesOptions) imagesSorted {
+ var imagesOutput imagesSorted
for _, img := range images {
// If all is false and the image doesn't have a name, check to see if the top layer of the image is a parent
// to another image's top layer. If it is, then it is an intermediate image so don't print out if the --all flag
@@ -305,7 +306,7 @@ func getImagesTemplateOutput(ctx context.Context, images []*adapter.ContainerIma
// Sort images by created time
sortImagesOutput(opts.sort, imagesOutput)
- return
+ return imagesOutput
}
// getImagesJSONOutput returns the images information in its raw form
@@ -346,7 +347,7 @@ func generateImagesOutput(ctx context.Context, images []*adapter.ContainerImage,
imagesOutput := getImagesTemplateOutput(ctx, images, opts)
out = formats.StdoutTemplateArray{Output: imagesToGeneric(imagesOutput, []imagesJSONParams{}), Template: opts.outputformat, Fields: templateMap}
}
- return formats.Writer(out).Out()
+ return out.Out()
}
// GenImageOutputMap generates the map used for outputting the images header