def set_plan2

cswap-bend-cli@0.1.0.0 · profcmd.bend:147

import cswap-bend-cli@0.1.0.0/profcmd.bend as Profcmd
import Base
import cswap-bend-cli@0.1.0.0/json.bend as Json
import cswap-bend-cli@0.1.0.0/profile.bend as P

147def set_plan2(+valid: Bool, +json: Bool, +raw: Json.Json, +name: String, +key: String, +value: String) -> Plan2:
148  match valid:
149    case False{}:
150      Answer{err(json, "invalid profile name '" ++ name ++ "': use letters, digits, '-' and '_', starting with a letter or digit")}
151    case True{}:
152      set_plan3(P.update(set_base(P.find(raw, name), name), key, value), json, raw, name, key, value)

Uses (10)

Used by (1)