diff options
author | Paul Holzinger <paul.holzinger@web.de> | 2021-02-11 14:15:26 +0100 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2021-02-18 11:09:40 -0500 |
commit | 3bddeebf930efb872b99966df5553e0baf81834a (patch) | |
tree | ec2f40a9dd4d79f4fab75d35f5094121c9c5b7a0 /cmd/podman | |
parent | c50d969a0e79161c9d5d6f7933009253b067233e (diff) | |
download | podman-3bddeebf930efb872b99966df5553e0baf81834a.tar.gz podman-3bddeebf930efb872b99966df5553e0baf81834a.tar.bz2 podman-3bddeebf930efb872b99966df5553e0baf81834a.zip |
Enable stylecheck linter
Use the stylecheck linter and fix the reported problems.
[NO TESTS NEEDED]
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
<MH: Fix cherry-pick conflict>
Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/images/search.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/podman/images/search.go b/cmd/podman/images/search.go index c8ea4b04a..b8274cfce 100644 --- a/cmd/podman/images/search.go +++ b/cmd/podman/images/search.go @@ -156,12 +156,12 @@ func imageSearch(cmd *cobra.Command, args []string) error { return errors.Errorf("filters are not applicable to list tags result") } if report.IsJSON(searchOptions.Format) { - listTagsEntries := buildListTagsJson(searchReport) - return printJson(listTagsEntries) + listTagsEntries := buildListTagsJSON(searchReport) + return printArbitraryJSON(listTagsEntries) } row = "{{.Name}}\t{{.Tag}}\n" case report.IsJSON(searchOptions.Format): - return printJson(searchReport) + return printArbitraryJSON(searchReport) case cmd.Flags().Changed("format"): renderHeaders = parse.HasTable(searchOptions.Format) row = report.NormalizeFormat(searchOptions.Format) @@ -186,7 +186,7 @@ func imageSearch(cmd *cobra.Command, args []string) error { return tmpl.Execute(w, searchReport) } -func printJson(v interface{}) error { +func printArbitraryJSON(v interface{}) error { prettyJSON, err := json.MarshalIndent(v, "", " ") if err != nil { return err @@ -195,7 +195,7 @@ func printJson(v interface{}) error { return nil } -func buildListTagsJson(searchReport []entities.ImageSearchReport) []listEntryTag { +func buildListTagsJSON(searchReport []entities.ImageSearchReport) []listEntryTag { entries := []listEntryTag{} ReportLoop: |