Documentation ¶
Index ¶
- type ExpectSubprocess
- func (expect *ExpectSubprocess) AsyncInteractChannels() (send chan string, receive chan string)
- func (expect *ExpectSubprocess) Close() error
- func (expect *ExpectSubprocess) Expect(searchString string) (e error)
- func (expect *ExpectSubprocess) ExpectRegex(regexSearchString string) (e error)
- func (expect *ExpectSubprocess) ExpectTimeout(searchString string, timeout time.Duration) (e error)
- func (expect *ExpectSubprocess) Interact()
- func (expect *ExpectSubprocess) ReadLine() (string, error)
- func (expect *ExpectSubprocess) ReadUntil(delim byte) ([]byte, error)
- func (expect *ExpectSubprocess) Send(command string) error
- func (expect *ExpectSubprocess) SendLine(command string) error
- func (expect *ExpectSubprocess) Start() error
- func (expect *ExpectSubprocess) Wait() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExpectSubprocess ¶
func Command ¶
func Command(command string) (*ExpectSubprocess, error)
func Spawn ¶
func Spawn(command string) (*ExpectSubprocess, error)
func SpawnAtDirectory ¶
func SpawnAtDirectory(command string, directory string) (*ExpectSubprocess, error)
func (*ExpectSubprocess) AsyncInteractChannels ¶
func (expect *ExpectSubprocess) AsyncInteractChannels() (send chan string, receive chan string)
func (*ExpectSubprocess) Close ¶
func (expect *ExpectSubprocess) Close() error
func (*ExpectSubprocess) Expect ¶
func (expect *ExpectSubprocess) Expect(searchString string) (e error)
func (*ExpectSubprocess) ExpectRegex ¶
func (expect *ExpectSubprocess) ExpectRegex(regexSearchString string) (e error)
This quite possibly won't work as we're operating on an incomplete stream. It might work if all the input is within one Flush, but that can't be relied upon. I need to find a nice, safe way to apply a regex to a stream of partial content, given we don't not knowing how long our input is, and thus can't buffer it. Until that point, please just use Expect, or use the channel to parse the stream yourself.
func (*ExpectSubprocess) ExpectTimeout ¶
func (expect *ExpectSubprocess) ExpectTimeout(searchString string, timeout time.Duration) (e error)
func (*ExpectSubprocess) Interact ¶
func (expect *ExpectSubprocess) Interact()
func (*ExpectSubprocess) ReadLine ¶
func (expect *ExpectSubprocess) ReadLine() (string, error)
func (*ExpectSubprocess) ReadUntil ¶
func (expect *ExpectSubprocess) ReadUntil(delim byte) ([]byte, error)
func (*ExpectSubprocess) Send ¶
func (expect *ExpectSubprocess) Send(command string) error
func (*ExpectSubprocess) SendLine ¶
func (expect *ExpectSubprocess) SendLine(command string) error
func (*ExpectSubprocess) Start ¶
func (expect *ExpectSubprocess) Start() error
func (*ExpectSubprocess) Wait ¶
func (expect *ExpectSubprocess) Wait() error
Click to show internal directories.
Click to hide internal directories.