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

Function readInput

pkg/cli/ui/terminal.go:31–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29)
30
31func readInput() (string, error) {
32 reader := bufio.NewReader(os.Stdin)
33 input, err := reader.ReadString('\n')
34 if err != nil {
35 return "", errors.Wrap(err, "reading stdin")
36 }
37
38 return strings.Trim(input, "\r\n"), nil
39}
40
41// PromptInput prompts the user input and saves the result to the destination
42func PromptInput(message string, dest *string) error {

Callers 1

PromptInputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected