def switch_route

cswap-bend-cli@0.1.0.0 · exec.bend:164

import cswap-bend-cli@0.1.0.0/exec.bend as Exec
import Base
import cswap-bend-cli@0.1.0.0/cliops.bend as Cliops
import cswap-bend-cli@0.1.0.0/profswitch.bend as Profswitch
import cswap-bend-cli@0.1.0.0/cmd.bend as Cmd
import cswap-bend-cli@0.1.0.0/args.bend as Args

164# `switch` follows a behaviour profile when `--profile NAME` (or the active
165# profile) names one; every other command runs as parsed.
166def switch_route(+ni: Cliops.Ni, +over: Maybe<&2, String>, +p: Args.Parsed) -> IO(Cmd.Out):
167  match p:
168    case Args.PSwitch{ident, force, strategy, model, json}:
169      with_ctx(ctx => Profswitch.switch_cmd(ctx, over, ident, force, strategy, model, json))
170    case _:
171      dispatch(ni, p)

Uses (9)

Used by (1)