summaryrefslogtreecommitdiff
path: root/cmd/podman/networks/inspect.go
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-04-28 14:56:56 +0200
committerPaul Holzinger <pholzing@redhat.com>2022-04-28 15:11:25 +0200
commit8be97815865ccf265923e50fe66d7739200ec20d (patch)
treec3789153f8105c30c9b9bc96328b9eb5977b113d /cmd/podman/networks/inspect.go
parentf93ba587c608e2678b176f1460b32e8a144edf1a (diff)
downloadpodman-8be97815865ccf265923e50fe66d7739200ec20d.tar.gz
podman-8be97815865ccf265923e50fe66d7739200ec20d.tar.bz2
podman-8be97815865ccf265923e50fe66d7739200ec20d.zip
network inspect --format: add completion for go template
Make sure to autocomplete the go template for network inspect. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'cmd/podman/networks/inspect.go')
-rw-r--r--cmd/podman/networks/inspect.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/podman/networks/inspect.go b/cmd/podman/networks/inspect.go
index 3c07e5492..8f39ec395 100644
--- a/cmd/podman/networks/inspect.go
+++ b/cmd/podman/networks/inspect.go
@@ -1,6 +1,7 @@
package network
import (
+ "github.com/containers/common/libnetwork/types"
"github.com/containers/podman/v4/cmd/podman/common"
"github.com/containers/podman/v4/cmd/podman/inspect"
"github.com/containers/podman/v4/cmd/podman/registry"
@@ -32,7 +33,7 @@ func init() {
formatFlagName := "format"
flags.StringVarP(&inspectOpts.Format, formatFlagName, "f", "", "Pretty-print network to JSON or using a Go template")
- _ = networkinspectCommand.RegisterFlagCompletionFunc(formatFlagName, common.AutocompleteFormat(nil))
+ _ = networkinspectCommand.RegisterFlagCompletionFunc(formatFlagName, common.AutocompleteFormat(&types.Network{}))
}
func networkInspect(_ *cobra.Command, args []string) error {