MCPcopy Index your code
hub / github.com/SpectoLabs/hoverfly / askForConfirmation

Function askForConfirmation

hoverctl/cmd/utils.go:35–49  ·  view source on GitHub ↗
(message string)

Source from the content-addressed store, hash-verified

33}
34
35func askForConfirmation(message string) bool {
36 if force {
37 return true
38 }
39
40 for {
41 response := askForInput(message+" [y/n]", false)
42
43 if response == "y" || response == "yes" {
44 return true
45 } else if response == "n" || response == "no" {
46 return false
47 }
48 }
49}
50
51func askForInput(value string, sensitive bool) string {
52 if force {

Callers 4

flush.goFile · 0.85
delete.goFile · 0.85
targets.goFile · 0.85
bash_completion.goFile · 0.85

Calls 1

askForInputFunction · 0.85

Tested by

no test coverage detected