def set_in

cswap-bend-cli@0.1.0.0 · setwrite.bend:148

import cswap-bend-cli@0.1.0.0/setwrite.bend as Setwrite
import Base
import cswap-bend-cli@0.1.0.0/setload.bend as Setload
import cswap-bend-cli@0.1.0.0/json.bend as Json
import cswap-bend-cli@0.1.0.0/settings.bend as Settings

148# raw[section][key] = v, with schemaVersion defaulted; only that key written.
149def set_in(+raw: Json.Json, sp: Settings.Spec, v: Json.Json) -> Json.Json:
150  match sp:
151    case Settings.Spec{+section, key, kind, lo, hi, choices, dflt}:
152      Json.set(section, Json.set(key, v, Setload.section_of(raw, section)), Setload.with_version(raw))

Uses (5)

Used by (1)