MCPcopy Create free account
hub / github.com/google/pprof / ReadLine

Method ReadLine

internal/proftest/proftest.go:93–103  ·  view source on GitHub ↗

ReadLine returns no input, as no input is expected during testing.

(_ string)

Source from the content-addressed store, hash-verified

91
92// ReadLine returns no input, as no input is expected during testing.
93func (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.
106func (ui *TestUI) Print(args ...interface{}) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected