Update allocations.go
This commit is contained in:
parent
51aa4c73cd
commit
e7d93a5248
|
@ -43,16 +43,16 @@ func (a *Allocations) Bindings() nat.PortMap {
|
||||||
HostPort: strconv.Itoa(port),
|
HostPort: strconv.Itoa(port),
|
||||||
}
|
}
|
||||||
|
|
||||||
if tcpPort, ok := out[nat.Port(fmt.Sprintf("%d/tcp", port))]; !ok {
|
if v, ok := out[nat.Port(fmt.Sprintf("%d/tcp", port))]; ok {
|
||||||
out[nat.Port(fmt.Sprintf("%d/tcp", port))] = []nat.PortBinding{binding}
|
out[nat.Port(fmt.Sprintf("%d/tcp", port))] = append(v, binding)
|
||||||
} else {
|
} else {
|
||||||
out[nat.Port(fmt.Sprintf("%d/tcp", port))] = append(tcpPort, binding)
|
out[nat.Port(fmt.Sprintf("%d/tcp", port))] = []nat.PortBinding{binding}
|
||||||
}
|
}
|
||||||
|
|
||||||
if udpPort, ok := out[nat.Port(fmt.Sprintf("%d/udp", port))]; !ok {
|
if v, ok := out[nat.Port(fmt.Sprintf("%d/udp", port))]; ok {
|
||||||
out[nat.Port(fmt.Sprintf("%d/udp", port))] = []nat.PortBinding{binding}
|
out[nat.Port(fmt.Sprintf("%d/udp", port))] = append(v, binding)
|
||||||
} else {
|
} else {
|
||||||
out[nat.Port(fmt.Sprintf("%d/udp", port))] = append(udpPort, binding)
|
out[nat.Port(fmt.Sprintf("%d/udp", port))] = []nat.PortBinding{binding}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user