Named sets the PTY name in the logs. Defaults to "cmd". Make sure you set this before anything starts writing to the pty, or it may not be named consistently. E.g. p := New(t).Named("myCmd")
(name string)
| 440 | // |
| 441 | // p := New(t).Named("myCmd") |
| 442 | func (p *PTY) Named(name string) *PTY { |
| 443 | p.name.Store(name) |
| 444 | return p |
| 445 | } |
| 446 | |
| 447 | type PTYCmd struct { |
| 448 | outExpecter |