diff options
Diffstat (limited to 'cmd/podman/pods')
-rw-r--r-- | cmd/podman/pods/create.go | 10 | ||||
-rw-r--r-- | cmd/podman/pods/pod.go | 2 | ||||
-rw-r--r-- | cmd/podman/pods/ps.go | 10 | ||||
-rw-r--r-- | cmd/podman/pods/stats.go | 4 |
4 files changed, 13 insertions, 13 deletions
diff --git a/cmd/podman/pods/create.go b/cmd/podman/pods/create.go index 62b5b849e..5ed5fa57c 100644 --- a/cmd/podman/pods/create.go +++ b/cmd/podman/pods/create.go @@ -73,8 +73,8 @@ func aliasNetworkFlag(_ *pflag.FlagSet, name string) pflag.NormalizedName { func create(cmd *cobra.Command, args []string) error { var ( - err error - podIdFile *os.File + err error + podIDFD *os.File ) createOptions.Labels, err = parse.GetAllLabels(labelFile, labels) if err != nil { @@ -101,15 +101,15 @@ func create(cmd *cobra.Command, args []string) error { } if cmd.Flag("pod-id-file").Changed { - podIdFile, err = util.OpenExclusiveFile(podIDFile) + podIDFD, err = util.OpenExclusiveFile(podIDFile) if err != nil && os.IsExist(err) { return errors.Errorf("pod id file exists. Ensure another pod is not using it or delete %s", podIDFile) } if err != nil { return errors.Errorf("error opening pod-id-file %s", podIDFile) } - defer errorhandling.CloseQuiet(podIdFile) - defer errorhandling.SyncQuiet(podIdFile) + defer errorhandling.CloseQuiet(podIDFD) + defer errorhandling.SyncQuiet(podIDFD) } createOptions.Net, err = common.NetFlagsToNetOptions(cmd) diff --git a/cmd/podman/pods/pod.go b/cmd/podman/pods/pod.go index ed265ef90..9dc538c71 100644 --- a/cmd/podman/pods/pod.go +++ b/cmd/podman/pods/pod.go @@ -10,7 +10,7 @@ import ( var ( // Pull in configured json library - json = registry.JsonLibrary() + json = registry.JSONLibrary() // Command: podman _pod_ podCmd = &cobra.Command{ diff --git a/cmd/podman/pods/ps.go b/cmd/podman/pods/ps.go index 1385ff270..bcd1db84c 100644 --- a/cmd/podman/pods/ps.go +++ b/cmd/podman/pods/ps.go @@ -195,7 +195,7 @@ func (l ListPodReporter) ID() string { } // Id returns the Pod id -func (l ListPodReporter) Id() string { +func (l ListPodReporter) Id() string { //nolint if noTrunc { return l.ListPodsReport.Id } @@ -209,7 +209,7 @@ func (l ListPodReporter) InfraID() string { // InfraId returns the infra container id for the pod // depending on trunc -func (l ListPodReporter) InfraId() string { +func (l ListPodReporter) InfraId() string { //nolint if len(l.ListPodsReport.InfraId) == 0 { return "" } @@ -252,7 +252,7 @@ func sortPodPsOutput(sortBy string, lprs []*entities.ListPodsReport) error { case "created": sort.Sort(podPsSortedCreated{lprs}) case "id": - sort.Sort(podPsSortedId{lprs}) + sort.Sort(podPsSortedID{lprs}) case "name": sort.Sort(podPsSortedName{lprs}) case "number": @@ -276,9 +276,9 @@ func (a podPsSortedCreated) Less(i, j int) bool { return a.lprSort[i].Created.After(a.lprSort[j].Created) } -type podPsSortedId struct{ lprSort } +type podPsSortedID struct{ lprSort } -func (a podPsSortedId) Less(i, j int) bool { return a.lprSort[i].Id < a.lprSort[j].Id } +func (a podPsSortedID) Less(i, j int) bool { return a.lprSort[i].Id < a.lprSort[j].Id } type podPsSortedNumber struct{ lprSort } diff --git a/cmd/podman/pods/stats.go b/cmd/podman/pods/stats.go index d3950fdbc..d14632f01 100644 --- a/cmd/podman/pods/stats.go +++ b/cmd/podman/pods/stats.go @@ -71,7 +71,7 @@ func stats(cmd *cobra.Command, args []string) error { } format := statsOptions.Format - doJson := strings.ToLower(format) == formats.JSONString + doJSON := strings.ToLower(format) == formats.JSONString header := getPodStatsHeader(format) for { @@ -80,7 +80,7 @@ func stats(cmd *cobra.Command, args []string) error { return err } // Print the stats in the requested format and configuration. - if doJson { + if doJSON { if err := printJSONPodStats(reports); err != nil { return err } |