MCPcopy Index your code
hub / github.com/pterm/pterm / WithHandles

Method WithHandles

interactive_continue_printer.go:81–89  ·  view source on GitHub ↗

WithHandles allows you to customize the short handles for the answers.

(handles []string)

Source from the content-addressed store, hash-verified

79
80// WithHandles allows you to customize the short handles for the answers.
81func (p InteractiveContinuePrinter) WithHandles(handles []string) *InteractiveContinuePrinter {
82 if len(handles) != len(p.Options) {
83 Warning.Printf("%v is not a valid set of handles", handles)
84 p.setDefaultHandles()
85 return &p
86 }
87 p.Handles = handles
88 return &p
89}
90
91// WithShowShortHandles will set ShowShortHandles to true
92// this makes the printer display the shorthand options instead their shorthand version.

Calls 2

setDefaultHandlesMethod · 0.95
PrintfMethod · 0.65