+14
@@ -361,6 +361,10 @@ func (c *Context) trace(node *Node) (err error) { // nolint: gocyclo
|
||||
flags = append(flags, group...)
|
||||
}
|
||||
|
||||
if node.Passthrough {
|
||||
c.endParsing()
|
||||
}
|
||||
|
||||
for !c.scan.Peek().IsEOL() {
|
||||
token := c.scan.Peek()
|
||||
switch token.Type {
|
||||
@@ -901,6 +905,16 @@ func checkEnum(value *Value, target reflect.Value) error {
|
||||
}
|
||||
}
|
||||
|
||||
func checkPassthroughArg(target reflect.Value) bool {
|
||||
typ := target.Type()
|
||||
switch typ.Kind() {
|
||||
case reflect.Slice:
|
||||
return typ.Elem().Kind() == reflect.String
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
func checkXorDuplicates(paths []*Path) error {
|
||||
for _, path := range paths {
|
||||
seen := map[string]*Flag{}
|
||||
|
||||
Reference in New Issue
Block a user