MCPcopy Index your code
hub / github.com/coder/coder / ReadRune

Method ReadRune

testutil/expecter/expecter.go:236–251  ·  view source on GitHub ↗

nolint:govet // We don't care about conforming to ReadRune() (rune, int, error).

(ctx context.Context)

Source from the content-addressed store, hash-verified

234
235//nolint:govet // We don't care about conforming to ReadRune() (rune, int, error).
236func (e *Expecter) ReadRune(ctx context.Context) rune {
237 e.t.Helper()
238
239 var r rune
240 err := e.doMatchWithDeadline(ctx, "ReadRune", func(rd *bufio.Reader) error {
241 var err error
242 r, _, err = rd.ReadRune()
243 return err
244 })
245 if err != nil {
246 e.fatalf("read error", "%v (wanted rune; got %q)", err, r)
247 return 0
248 }
249 e.Logf("matched rune = %q", r)
250 return r
251}
252
253func (e *Expecter) ReadLine(ctx context.Context) string {
254 e.t.Helper()

Callers 3

expectMatcherFuncMethod · 0.45
ExpectNoMatchBeforeMethod · 0.45
ReadLineMethod · 0.45

Calls 4

doMatchWithDeadlineMethod · 0.95
fatalfMethod · 0.95
LogfMethod · 0.95
HelperMethod · 0.65

Tested by

no test coverage detected