diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-08-24 10:30:11 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-24 10:30:11 -0400 |
commit | e9daaf62e3921b8c696f3abd92f001a9447c8aa1 (patch) | |
tree | ea500d48f28682ad36f6eb4954717c6629fb68b4 /cmd/podman/common/util.go | |
parent | e20ec47a59b4ac65d42f3fee7b8b7ec5760ea35d (diff) | |
parent | c0b1edd6a4dcad2b89a01975988d186b21b3158e (diff) | |
download | podman-e9daaf62e3921b8c696f3abd92f001a9447c8aa1.tar.gz podman-e9daaf62e3921b8c696f3abd92f001a9447c8aa1.tar.bz2 podman-e9daaf62e3921b8c696f3abd92f001a9447c8aa1.zip |
Merge pull request #11232 from Luap99/network
Network interface
Diffstat (limited to 'cmd/podman/common/util.go')
-rw-r--r-- | cmd/podman/common/util.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/podman/common/util.go b/cmd/podman/common/util.go index 6a0af4dff..cdfff9d6f 100644 --- a/cmd/podman/common/util.go +++ b/cmd/podman/common/util.go @@ -6,7 +6,7 @@ import ( "strconv" "strings" - "github.com/containers/podman/v3/pkg/specgen" + "github.com/containers/podman/v3/libpod/network/types" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) @@ -90,10 +90,10 @@ func createExpose(expose []string) (map[uint16]string, error) { } // CreatePortBindings iterates ports mappings into SpecGen format. -func CreatePortBindings(ports []string) ([]specgen.PortMapping, error) { +func CreatePortBindings(ports []string) ([]types.PortMapping, error) { // --publish is formatted as follows: // [[hostip:]hostport[-endPort]:]containerport[-endPort][/protocol] - toReturn := make([]specgen.PortMapping, 0, len(ports)) + toReturn := make([]types.PortMapping, 0, len(ports)) for _, p := range ports { var ( @@ -169,8 +169,8 @@ func CreatePortBindings(ports []string) ([]specgen.PortMapping, error) { // parseSplitPort parses individual components of the --publish flag to produce // a single port mapping in SpecGen format. -func parseSplitPort(hostIP, hostPort *string, ctrPort string, protocol *string) (specgen.PortMapping, error) { - newPort := specgen.PortMapping{} +func parseSplitPort(hostIP, hostPort *string, ctrPort string, protocol *string) (types.PortMapping, error) { + newPort := types.PortMapping{} if ctrPort == "" { return newPort, errors.Errorf("must provide a non-empty container port to publish") } |