def Url.host_port
import bend-kube-runtime@0.2.0.0/src/config.bend as Configimport Base
87# "[::1]:6443" or "host:6443" or "host": the host and the port (dflt when
88# none is given).
89def Url.host_port(a: String, +dflt: U32) -> String & U32:
90 match a:
91 case SCon{'[', t}:
92 Url.host_port.v6(String.split(t, ']'), dflt)
93 case +x:
94 Url.host_port.v4(String.split(x, ':'), dflt)