summaryrefslogtreecommitdiff
path: root/cmd/podman/machine/list.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/machine/list.go')
-rw-r--r--cmd/podman/machine/list.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/cmd/podman/machine/list.go b/cmd/podman/machine/list.go
index ef26b7886..5254d50cf 100644
--- a/cmd/podman/machine/list.go
+++ b/cmd/podman/machine/list.go
@@ -43,7 +43,7 @@ type listFlagType struct {
quiet bool
}
-type machineReporter struct {
+type ListReporter struct {
Name string
Default bool
Created string
@@ -68,7 +68,7 @@ func init() {
flags := lsCmd.Flags()
formatFlagName := "format"
flags.StringVar(&listFlag.format, formatFlagName, "{{.Name}}\t{{.VMType}}\t{{.Created}}\t{{.LastUp}}\t{{.CPUs}}\t{{.Memory}}\t{{.DiskSize}}\n", "Format volume output using JSON or a Go template")
- _ = lsCmd.RegisterFlagCompletionFunc(formatFlagName, common.AutocompleteFormat(&machineReporter{}))
+ _ = lsCmd.RegisterFlagCompletionFunc(formatFlagName, common.AutocompleteFormat(&ListReporter{}))
flags.BoolVar(&listFlag.noHeading, "noheading", false, "Do not print headers")
flags.BoolVarP(&listFlag.quiet, "quiet", "q", false, "Show only machine names")
}
@@ -121,8 +121,8 @@ func list(cmd *cobra.Command, args []string) error {
return outputTemplate(cmd, machineReporter)
}
-func outputTemplate(cmd *cobra.Command, responses []*machineReporter) error {
- headers := report.Headers(machineReporter{}, map[string]string{
+func outputTemplate(cmd *cobra.Command, responses []*ListReporter) error {
+ headers := report.Headers(ListReporter{}, map[string]string{
"LastUp": "LAST UP",
"VmType": "VM TYPE",
"CPUs": "CPUS",
@@ -181,15 +181,15 @@ func streamName(imageStream string) string {
return imageStream
}
-func toMachineFormat(vms []*machine.ListResponse) ([]*machineReporter, error) {
+func toMachineFormat(vms []*machine.ListResponse) ([]*ListReporter, error) {
cfg, err := config.ReadCustomConfig()
if err != nil {
return nil, err
}
- machineResponses := make([]*machineReporter, 0, len(vms))
+ machineResponses := make([]*ListReporter, 0, len(vms))
for _, vm := range vms {
- response := new(machineReporter)
+ response := new(ListReporter)
response.Default = vm.Name == cfg.Engine.ActiveService
response.Name = vm.Name
response.Running = vm.Running
@@ -209,15 +209,15 @@ func toMachineFormat(vms []*machine.ListResponse) ([]*machineReporter, error) {
return machineResponses, nil
}
-func toHumanFormat(vms []*machine.ListResponse) ([]*machineReporter, error) {
+func toHumanFormat(vms []*machine.ListResponse) ([]*ListReporter, error) {
cfg, err := config.ReadCustomConfig()
if err != nil {
return nil, err
}
- humanResponses := make([]*machineReporter, 0, len(vms))
+ humanResponses := make([]*ListReporter, 0, len(vms))
for _, vm := range vms {
- response := new(machineReporter)
+ response := new(ListReporter)
if vm.Name == cfg.Engine.ActiveService {
response.Name = vm.Name + "*"
response.Default = true