@@ -302,6 +302,7 @@ func hydrateTag(t *Tag, typ reflect.Type) error { //nolint: gocyclo
|
|||||||
return fmt.Errorf("passthrough only makes sense for positional arguments or commands")
|
return fmt.Errorf("passthrough only makes sense for positional arguments or commands")
|
||||||
}
|
}
|
||||||
t.Passthrough = passthrough
|
t.Passthrough = passthrough
|
||||||
|
if t.Passthrough {
|
||||||
passthroughMode := t.Get("passthrough")
|
passthroughMode := t.Get("passthrough")
|
||||||
switch passthroughMode {
|
switch passthroughMode {
|
||||||
case "partial":
|
case "partial":
|
||||||
@@ -311,6 +312,7 @@ func hydrateTag(t *Tag, typ reflect.Type) error { //nolint: gocyclo
|
|||||||
default:
|
default:
|
||||||
return fmt.Errorf("invalid passthrough mode %q, must be one of 'partial' or 'all'", passthroughMode)
|
return fmt.Errorf("invalid passthrough mode %q, must be one of 'partial' or 'all'", passthroughMode)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user