blob: 8ec62048f82ed4d8655a537e7302ccb7f83c90cc [file] [log] [blame]
Scott Bakerbdb962b2020-04-03 10:53:36 -07001package flags
2
3import (
4 "reflect"
5)
6
7// Arg represents a positional argument on the command line.
8type Arg struct {
9 // The name of the positional argument (used in the help)
10 Name string
11
12 // A description of the positional argument (used in the help)
13 Description string
14
15 // The minimal number of required positional arguments
16 Required int
17
18 // The maximum number of required positional arguments
19 RequiredMaximum int
20
21 value reflect.Value
22 tag multiTag
23}
24
25func (a *Arg) isRemaining() bool {
26 return a.value.Type().Kind() == reflect.Slice
27}