MCPcopy Create free account
hub / github.com/HashLoad/boss / PromptUntilYorN

Method PromptUntilYorN

msg/msg.go:170–181  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

168}
169
170func (m *Messenger) PromptUntilYorN() bool {
171 res, err := m.PromptUntil([]string{"y", "yes", "n", "no"})
172 if err != nil {
173 m.Die("Error processing response: %s", err)
174 }
175
176 if res == "y" || res == "yes" {
177 return true
178 }
179
180 return false
181}

Callers 1

PromptUntilYorNFunction · 0.80

Calls 2

PromptUntilMethod · 0.95
DieMethod · 0.95

Tested by

no test coverage detected