Skip to content

Commit

Permalink
fix: whoops, forgot to prefix "and"
Browse files Browse the repository at this point in the history
  • Loading branch information
alecthomas committed Dec 29, 2024
1 parent 47b090f commit b811e32
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions build.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b811e32

Please sign in to comment.