ReadLine returns no input, as no input is expected during testing.
(_ string)
| 91 | |
| 92 | // ReadLine returns no input, as no input is expected during testing. |
| 93 | func (ui *TestUI) ReadLine(_ string) (string, error) { |
| 94 | if ui.index >= len(ui.Input) { |
| 95 | return "", io.EOF |
| 96 | } |
| 97 | input := ui.Input[ui.index] |
| 98 | ui.index++ |
| 99 | if input == "**error**" { |
| 100 | return "", fmt.Errorf("error: %s", input) |
| 101 | } |
| 102 | return input, nil |
| 103 | } |
| 104 | |
| 105 | // Print messages are discarded by the test UI. |
| 106 | func (ui *TestUI) Print(args ...interface{}) { |
nothing calls this directly
no outgoing calls
no test coverage detected