MCPcopy Index your code
hub / github.com/opencloud-eu/opencloud / stringPrompt

Function stringPrompt

opencloud/pkg/command/init.go:75–86  ·  view source on GitHub ↗
(label string)

Source from the content-addressed store, hash-verified

73}
74
75func stringPrompt(label string) string {
76 input := ""
77 reader := bufio.NewReader(os.Stdin)
78 for {
79 _, _ = fmt.Fprint(os.Stderr, label+" ")
80 input, _ = reader.ReadString('\n')
81 if input != "" {
82 break
83 }
84 }
85 return strings.TrimSpace(input)
86}

Callers 2

InitCommandFunction · 0.85
checkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected