def Url.host_port

bend-kube-runtime@0.2.0.0 · src/config.bend:87

import bend-kube-runtime@0.2.0.0/src/config.bend as Config
import 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)

Uses (10)

Used by (2)