MCPcopy Index your code
hub / github.com/dnote/dnote / PromptInput

Function PromptInput

pkg/cli/ui/terminal.go:42–53  ·  view source on GitHub ↗

PromptInput prompts the user input and saves the result to the destination

(message string, dest *string)

Source from the content-addressed store, hash-verified

40
41// PromptInput prompts the user input and saves the result to the destination
42func PromptInput(message string, dest *string) error {
43 log.Askf(message, false)
44
45 input, err := readInput()
46 if err != nil {
47 return errors.Wrap(err, "getting user input")
48 }
49
50 *dest = input
51
52 return nil
53}
54
55// PromptPassword prompts the user input a password and saves the result to the destination.
56// The input is masked, meaning it is not echoed on the terminal.

Callers 1

getUsernameFunction · 0.92

Calls 2

AskfFunction · 0.92
readInputFunction · 0.85

Tested by

no test coverage detected