fix: whoops, forgot to prefix "and"

This commit is contained in:
Alec Thomas
2024-12-29 18:02:02 +09:00
parent 47b090f2f4
commit b811e32243
+6
View File
@@ -154,6 +154,12 @@ MAIN:
}
}
if len(tag.And) != 0 {
for i := range tag.And {
tag.And[i] = tag.XorPrefix + tag.And[i]
}
}
// Nested structs are either commands or args, unless they implement the Mapper interface.
if field.value.Kind() == reflect.Struct && (tag.Cmd || tag.Arg) && k.registry.ForValue(fv) == nil {
typ := CommandNode