mirror of
https://github.com/moby/moby.git
synced 2026-07-14 19:41:50 +00:00
Use net.splitHostPort() instead of our own logic in func (p *PortBinding) FromString(s string) error. This means that IPv6 literals, including IPv4 in IPv6 literals, can now be parsed from the string form of PortBindings. Zoned addresses do not work - net.splitHostPort() parses them but net.ParseIP() cannot and returns an error. This is ok because we do not have a slot to store the zone name in PortBinding anyway. Signed-off-by: Euan Harris <euan.harris@docker.com>