def Url.split_path
import bend-kube-runtime@0.2.0.0/src/config.bend as Configimport Base
56# Splits "authority/path" at the first '/'.
57def Url.split_path(s: String, acc: String) -> String & String:
58 match s:
59 case SNil{}:
60 (String.reverse(acc), "")
61 case SCon{'/', t}:
62 (String.reverse(acc), SCon{'/', t})
63 case SCon{c, t}:
64 Url.split_path(t, SCon{c, acc})