Switch.direct4: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/switch.bend as Switch Lines 27-34 of cswap-bend-cli@0.1.0.0/switch.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/switch.bend&start_line=27&end_line=34 import Base import cswap-bend-cli@0.1.0.0/json.bend as Json import cswap-bend-cli@0.1.0.0/act.bend as Act import cswap-bend-cli@0.1.0.0/swbase.bend as B import cswap-bend-cli@0.1.0.0/swlive.bend as L import cswap-bend-cli@0.1.0.0/swrun.bend as R import cswap-bend-cli@0.1.0.0/store/base.bend as SBase def direct4(+already: Bool, +ctx: SBase.Ctx, +n: String, +force: Bool, +opts: L.Opts, +email: String) -> Act.of(Json.Json): match already: case True{}: Act.pure(Json.Json, B.noop("direct", "already-active", "Already on Account-" ++ n ++ " (" ++ email ++ ")", B.ref(Some{n}, email), [])) case False{}: do ActM: op : Json.Json <- R.do_switch(ctx, n, force, opts) return B.forced_result(force, B.result_of_op(op, "direct", [])) Uses (18): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/act.bend&name=of https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/act.bend&name=pure https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json.bend&name=Json https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/store/base.bend&name=Ctx https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/swbase.bend&name=forced_result https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/swbase.bend&name=noop https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/swbase.bend&name=ref https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/swbase.bend&name=result_of_op https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/switch.bend&name=ActM https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/switch.bend&name=ActM.bind https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/switch.bend&name=ActM.pure https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/swlive.bend&name=Opts https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/swrun.bend&name=do_switch