MCPcopy Create free account
hub / github.com/OctopusDeploy/cli / receiveQuestion

Method receiveQuestion

test/testutil/fakesurvey.go:272–278  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

270}
271
272func (m *AskMocker) receiveQuestion() (survey.Prompt, *survey.AskOptions, bool) {
273 if m.Closed {
274 return nil, nil, false
275 }
276 request := <-m.Question
277 return request.question, request.options, !m.Closed // reading from closed channels works fine and just returns the default
278}
279
280// sendAnswer blindly sends an answer down the answer channel, regardless of whether
281// a question has been asked or not. You should use ExpectQuestion.AnswerWith instead of this

Callers 1

ReceiveQuestionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected