def Kube.envs

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

import bend-kube-runtime@0.2.0.0/src/config.bend as Config
import Base
import bend-kube-runtime@0.2.0.0/src/json.bend as J

179# An exec plugin's env entries ({name, value}) as "name=value".
180def Kube.envs(xs: List<&2, J.Json>) -> List<&2, String>:
181  match xs:
182    case Nil{}:
183      Nil{}
184    case Con{+x, t}:
185      (J.Json.str_or(J.Json.get(x, "name"), "") ++ "=" ++ J.Json.str_or(J.Json.get(x, "value"), ""))
186        <> Kube.envs(t)

Uses (6)

Used by (1)