summaryrefslogtreecommitdiff
path: root/cmd/podman/pods/create.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/pods/create.go')
-rw-r--r--cmd/podman/pods/create.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/cmd/podman/pods/create.go b/cmd/podman/pods/create.go
index d30f4782a..1f8152f32 100644
--- a/cmd/podman/pods/create.go
+++ b/cmd/podman/pods/create.go
@@ -17,6 +17,7 @@ import (
"github.com/containers/podman/v4/cmd/podman/containers"
"github.com/containers/podman/v4/cmd/podman/parse"
"github.com/containers/podman/v4/cmd/podman/registry"
+ "github.com/containers/podman/v4/cmd/podman/utils"
"github.com/containers/podman/v4/libpod/define"
"github.com/containers/podman/v4/pkg/domain/entities"
"github.com/containers/podman/v4/pkg/errorhandling"
@@ -26,7 +27,6 @@ import (
"github.com/docker/docker/pkg/parsers"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
- "github.com/spf13/pflag"
)
var (
@@ -99,14 +99,7 @@ func init() {
shareParentFlagName := "share-parent"
flags.BoolVar(&shareParent, shareParentFlagName, true, "Set the pod's cgroup as the cgroup parent for all containers joining the pod")
- flags.SetNormalizeFunc(aliasNetworkFlag)
-}
-
-func aliasNetworkFlag(_ *pflag.FlagSet, name string) pflag.NormalizedName {
- if name == "net" {
- name = "network"
- }
- return pflag.NormalizedName(name)
+ flags.SetNormalizeFunc(utils.AliasFlags)
}
func create(cmd *cobra.Command, args []string) error {