refactor(hosts): export hostContainersInternal variable
Because we need to use the value of this variable in podman, exporting this variable means we don't have to hardcode this string in podman. This will make the code easier to maintain. Signed-off-by: Black-Hole1 <bh@bugs.cc>
This commit is contained in:
parent
f40c21a4b5
commit
ab16e8d843
|
|
@ -13,7 +13,7 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
hostContainersInternal = "host.containers.internal"
|
||||
HostContainersInternal = "host.containers.internal"
|
||||
localhost = "localhost"
|
||||
)
|
||||
|
||||
|
|
@ -118,7 +118,7 @@ func newHost(params *Params) error {
|
|||
l2 := HostEntry{IP: "::1", Names: lh}
|
||||
containerIPs = append(containerIPs, l1, l2)
|
||||
if params.HostContainersInternalIP != "" {
|
||||
e := HostEntry{IP: params.HostContainersInternalIP, Names: []string{hostContainersInternal}}
|
||||
e := HostEntry{IP: params.HostContainersInternalIP, Names: []string{HostContainersInternal}}
|
||||
containerIPs = append(containerIPs, e)
|
||||
}
|
||||
containerIPs = append(containerIPs, params.ContainerIPs...)
|
||||
|
|
|
|||
Loading…
Reference in New Issue