Skip to content

Commit

Permalink
refactor: ignore invalid custom handles
Browse files Browse the repository at this point in the history
  • Loading branch information
luisdavim committed Sep 15, 2022
1 parent f3af99e commit 0511586
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion interactive_continue_printer.go
Expand Up @@ -79,7 +79,9 @@ func (p InteractiveContinuePrinter) WithOptions(options []string) *InteractiveCo
// WithHandles allows you to customize the short handles for the answers.
func (p InteractiveContinuePrinter) WithHandles(handles []string) *InteractiveContinuePrinter {
if len(handles) != len(p.Options) {
panic("Invalid number of handles")
Warning.Printf("%v is not a valid set of handles", handles)
p.setDefaultHandles()
return &p
}
p.Handles = handles
return &p
Expand Down

0 comments on commit 0511586

Please sign in to comment.