diff options
author | Paul Holzinger <paul.holzinger@web.de> | 2021-02-11 14:15:26 +0100 |
---|---|---|
committer | Paul Holzinger <paul.holzinger@web.de> | 2021-02-11 23:01:29 +0100 |
commit | ef2fc90f2d0057bfddee1b83d307e853181a4988 (patch) | |
tree | d1a8f350ff32068ea017e7a5c5384c8a184a8fb5 /cmd/podman/images | |
parent | afe4ce6b1ce6a5ba21472f51defd243bdd7750b3 (diff) | |
download | podman-ef2fc90f2d0057bfddee1b83d307e853181a4988.tar.gz podman-ef2fc90f2d0057bfddee1b83d307e853181a4988.tar.bz2 podman-ef2fc90f2d0057bfddee1b83d307e853181a4988.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>
Diffstat (limited to 'cmd/podman/images')
-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: |