MCPcopy
hub / github.com/docker/compose / Confirm

Method Confirm

cmd/prompt/prompt.go:97–102  ·  view source on GitHub ↗

Confirm asks for yes or no input

(message string, defaultValue bool)

Source from the content-addressed store, hash-verified

95
96// Confirm asks for yes or no input
97func (u Pipe) Confirm(message string, defaultValue bool) (bool, error) {
98 _, _ = fmt.Fprint(u.stdout, message)
99 var answer string
100 _, _ = fmt.Fscanln(u.stdin, &answer)
101 return utils.StringToBool(answer), nil
102}

Callers

nothing calls this directly

Calls 1

StringToBoolFunction · 0.92

Tested by

no test coverage detected