fakePrompter is a configurable Prompter. The on* hooks simulate the user acting on the prompt; a nil hook means the prompt is shown and acknowledged.
| 146 | // fakePrompter is a configurable Prompter. The on* hooks simulate the user |
| 147 | // acting on the prompt; a nil hook means the prompt is shown and acknowledged. |
| 148 | type fakePrompter struct { |
| 149 | urlCapable bool |
| 150 | formCapable bool |
| 151 | onURL func(context.Context, Prompt) error |
| 152 | onForm func(context.Context, Prompt) error |
| 153 | |
| 154 | mu sync.Mutex |
| 155 | urlCalls []Prompt |
| 156 | } |
| 157 | |
| 158 | func (p *fakePrompter) CanPromptURL() bool { return p.urlCapable } |
| 159 |
nothing calls this directly
no outgoing calls
no test coverage detected