summaryrefslogtreecommitdiff
path: root/cmd/podman/auto-update.go
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-04-28 18:09:20 +0200
committerMatthew Heon <matthew.heon@pm.me>2022-05-03 13:41:54 -0400
commitd4fe645ed4f9af88d267b17b00cb717efc5880d2 (patch)
tree5d1641a493771d55fab7cd97b8557dcc82aa682f /cmd/podman/auto-update.go
parent524b536101757e039bafa6dae74e4b45f2a5bd1f (diff)
downloadpodman-d4fe645ed4f9af88d267b17b00cb717efc5880d2.tar.gz
podman-d4fe645ed4f9af88d267b17b00cb717efc5880d2.tar.bz2
podman-d4fe645ed4f9af88d267b17b00cb717efc5880d2.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/auto-update.go')
-rw-r--r--cmd/podman/auto-update.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/podman/auto-update.go b/cmd/podman/auto-update.go
index f8b9fba08..1dc29530e 100644
--- a/cmd/podman/auto-update.go
+++ b/cmd/podman/auto-update.go
@@ -57,7 +57,7 @@ func init() {
flags.BoolVar(&autoUpdateOptions.Rollback, "rollback", true, "Rollback to previous image if update fails")
flags.StringVar(&autoUpdateOptions.format, "format", "", "Change the output format to JSON or a Go template")
- _ = autoUpdateCommand.RegisterFlagCompletionFunc("format", common.AutocompleteFormat(autoUpdateOutput{}))
+ _ = autoUpdateCommand.RegisterFlagCompletionFunc("format", common.AutocompleteFormat(&autoUpdateOutput{}))
}
func autoUpdate(cmd *cobra.Command, args []string) error {