remove statuscode.RenderHelp #1

Open
roberto wants to merge 4 commits from feature/no-more-help-status-code into main
2 changed files with 10 additions and 0 deletions
Showing only changes of commit 58b225f25e - Show all commits

View File

@ -182,6 +182,11 @@ func (arg *Argument) SetValue(value []string) {
arg.provided = &value
}
// Repeats tells if an argument should be presented as a list.
func (arg *Argument) Repeats() bool {
return arg.Variadic
}
func (arg *Argument) IsKnown() bool {
return arg.provided != nil && len(*arg.provided) > 0
}

View File

@ -137,6 +137,11 @@ func (opt *Option) ToString() string {
return stringValue
}
// Repeats tells if an option should be presented as a list.
func (opt *Option) Repeats() bool {
return opt.Repeated
}
func (opt *Option) internalValidate(name, current string) error {
if current == "" {
return nil