MCPcopy Create free account
hub / github.com/pterm/pterm / getShortHandles

Method getShortHandles

interactive_continue_printer.go:167–175  ·  view source on GitHub ↗

getShortHandles returns the short hand answers for the continueation prompt

()

Source from the content-addressed store, hash-verified

165
166// getShortHandles returns the short hand answers for the continueation prompt
167func (p InteractiveContinuePrinter) getShortHandles() []string {
168 var handles []string
169 for _, option := range p.Options {
170 handles = append(handles, strings.ToLower(string([]rune(option)[0])))
171 }
172 handles[p.DefaultValueIndex] = strings.ToUpper(handles[p.DefaultValueIndex])
173
174 return handles
175}
176
177// setDefaultHandles initialises the handles
178func (p *InteractiveContinuePrinter) setDefaultHandles() {

Callers 1

setDefaultHandlesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected