diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-07-22 13:13:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-22 13:13:50 +0200 |
commit | 3b52e4d0b5baacf5f63516c664a117a7537a075e (patch) | |
tree | ef6dc8150136e7941daf45a2e6b615dee43c7893 /cmd/podman/images.go | |
parent | d6b41eb393c154eaff79b4fdcb04c7510a6fdb20 (diff) | |
parent | db826d5d75630cca784bd7092eba5b06601ae27f (diff) | |
download | podman-3b52e4d0b5baacf5f63516c664a117a7537a075e.tar.gz podman-3b52e4d0b5baacf5f63516c664a117a7537a075e.tar.bz2 podman-3b52e4d0b5baacf5f63516c664a117a7537a075e.zip |
Merge pull request #3562 from baude/golangcilint3
golangci-lint round #3
Diffstat (limited to 'cmd/podman/images.go')
-rw-r--r-- | cmd/podman/images.go | 7 |
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 |