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

Method WriteLine

pty/ptytest/ptytest.go:426–436  ·  view source on GitHub ↗
(str string)

Source from the content-addressed store, hash-verified

424}
425
426func (p *PTY) WriteLine(str string) {
427 p.t.Helper()
428
429 newline := []byte{'\r'}
430 if runtime.GOOS == "windows" {
431 newline = append(newline, '\n')
432 }
433 p.logf("stdin: %q", str+string(newline))
434 _, err := p.Input().Write(append([]byte(str), newline...))
435 require.NoError(p.t, err, "write line failed")
436}
437
438// Named sets the PTY name in the logs. Defaults to "cmd". Make sure you set this before anything starts writing to the
439// pty, or it may not be named consistently. E.g.

Callers 15

TestCliTemplateCreateFunction · 0.80
TestTemplateDeleteFunction · 0.80
TestRenameFunction · 0.80
TestExpTaskResumeFunction · 0.80
TestCreateDynamicFunction · 0.80
TestCreateFunction · 0.80
TestCreateWithPresetFunction · 0.80

Implementers 3

otherPtypty/pty_other.go
ptyWindowspty/pty_windows.go
testPTYpty/ptytest/ptytest_windows.go

Calls 4

InputMethod · 0.95
logfMethod · 0.80
HelperMethod · 0.65
WriteMethod · 0.65

Tested by 15

TestCliTemplateCreateFunction · 0.64
TestTemplateDeleteFunction · 0.64
TestRenameFunction · 0.64
TestExpTaskResumeFunction · 0.64
TestCreateDynamicFunction · 0.64
TestCreateFunction · 0.64
TestCreateWithPresetFunction · 0.64