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

Method setDefaultHandles

interactive_continue_printer.go:178–188  ·  view source on GitHub ↗

setDefaultHandles initialises the handles

()

Source from the content-addressed store, hash-verified

176
177// setDefaultHandles initialises the handles
178func (p *InteractiveContinuePrinter) setDefaultHandles() {
179 if p.ShowShortHandles {
180 p.Handles = p.getShortHandles()
181 }
182
183 if len(p.Handles) == 0 {
184 p.Handles = make([]string, len(p.Options))
185 copy(p.Handles, p.Options)
186 p.Handles[p.DefaultValueIndex] = cases.Title(language.Und, cases.Compact).String(p.Handles[p.DefaultValueIndex])
187 }
188}
189
190// getSuffix returns the continuation prompt suffix
191func (p *InteractiveContinuePrinter) getSuffix() string {

Callers 2

WithHandlesMethod · 0.95
getSuffixMethod · 0.95

Calls 2

getShortHandlesMethod · 0.95
StringMethod · 0.45

Tested by

no test coverage detected