def naming.both

ezx@1.11.0.0 · src/pub/plan.bend:212

import ezx@1.11.0.0/src/pub/plan.bend as Plan
import Base

212# both keys given: the name first, then the version, then the name bend is
213# asked for, the version with bend's fourth number, `0`, after it
214def naming.both(name: Bool, ver: Bool, +pa: String, +pv: String) -> Named:
215  match name:
216    case False{}:
217      Unnamed{why.name(pa)}
218    case True{}:
219      match ver:
220        case False{}:
221          Unnamed{why.ver(pv)}
222        case True{}:
223          ByName{pa ++ "@" ++ pv ++ ".0"}

Uses (6)

Used by (1)