def group_given

cli@0.2.0.0 · cli.bend:3955

import cli@0.2.0.0/cli.bend as Cli
import Base

3955def group_given(items: List<&2, SpecItem>,
3956    +fields: List<&2, Field>, +name: String) -> Bool:
3957  match items:
3958    case Nil{}: False{}
3959    case SpecArg{ArgInfo{id, usage, short, long, kind, attrs}} <> tail:
3960      Bool.or(Bool.and(arg_in_group(attrs, name), field_given(fields, id)),
3961        group_given(tail, fields, name))
3962    case head <> tail: group_given(tail, fields, name)

Uses (10)

Used by (1)