summaryrefslogtreecommitdiff
path: root/cmd/podman/system/info.go
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-04-28 18:09:20 +0200
committerPaul Holzinger <pholzing@redhat.com>2022-04-28 18:12:17 +0200
commit0d9f190280f65a5441b113316304a740931e22d4 (patch)
treef29536f276f2239c95f9382fc44af9b99ae9c2c6 /cmd/podman/system/info.go
parentcac2b7800b2fa9c037565373b28dfef5ff8dd59f (diff)
downloadpodman-0d9f190280f65a5441b113316304a740931e22d4.tar.gz
podman-0d9f190280f65a5441b113316304a740931e22d4.tar.bz2
podman-0d9f190280f65a5441b113316304a740931e22d4.zip
shell completion --format: use structs by reference
For the AutocompleteFormat function we expect the correct template struct which is used in the golang template. The function can handle both struct and pointer to a struct. Using the reference is more efficient since it doe snot have to copy the whole struct. Also change some structs to use he actual type from the template instead of some nested one to make sure it has to correct fields. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'cmd/podman/system/info.go')
-rw-r--r--cmd/podman/system/info.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/podman/system/info.go b/cmd/podman/system/info.go
index 87ceaa7cd..f8fd946cd 100644
--- a/cmd/podman/system/info.go
+++ b/cmd/podman/system/info.go
@@ -66,7 +66,7 @@ func infoFlags(cmd *cobra.Command) {
formatFlagName := "format"
flags.StringVarP(&inFormat, formatFlagName, "f", "", "Change the output format to JSON or a Go template")
- _ = cmd.RegisterFlagCompletionFunc(formatFlagName, common.AutocompleteFormat(define.Info{}))
+ _ = cmd.RegisterFlagCompletionFunc(formatFlagName, common.AutocompleteFormat(&define.Info{}))
}
func info(cmd *cobra.Command, args []string) error {