Skip to content

Commit

Permalink
Remove incorrect comment
Browse files Browse the repository at this point in the history
  • Loading branch information
vsachs committed Jul 29, 2022
1 parent 7c3906d commit 1e3af52
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions command.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,20 +101,6 @@ func (o *Command) parseArguments(inputArgs *[]string) error {
continue
}
if !strings.HasPrefix(arg, "-") && oarg.GetPositional() {
// If this arg is a flag we just skip parsing positionals
// This has the subtle effect of requiring flags
// to use `=` for their value pairing if any
// positionals are defined AND are not satisfied yet.
// If they don't use `=` then the positional parse
// will unknowingly consume the arg on next iteration.
//
// It would be possible to potentially avoid this
// requirement IF we choose to check whether the
// flag in question has a default. If not then we
// know either:
// it must be for that flag OR
// the user made an error
// However this is highly ambiguous so best avoided.
if err := oarg.parsePositional(arg); err != nil {
return err
}
Expand Down

0 comments on commit 1e3af52

Please sign in to comment.