Documentation
¶
Index ¶
- func WithoutEcho(action func() error) error
- type ExpectPair
- type ExpectSubproc
- func (e *ExpectSubproc) Close() error
- func (e *ExpectSubproc) Debug(open bool)
- func (e *ExpectSubproc) Expect(searchStr string) error
- func (e *ExpectSubproc) ExpectMatch(regex string) (bool, error)
- func (e *ExpectSubproc) ExpectMulti(pairs []ExpectPair) error
- func (e *ExpectSubproc) ExpectMultiUser(pairs []ExpectPair) error
- func (e *ExpectSubproc) ExpectUser(searchStr string) error
- func (e *ExpectSubproc) Interact()
- func (e *ExpectSubproc) ReadLine() (string, error)
- func (e *ExpectSubproc) ReadLineUser() (string, error)
- func (e *ExpectSubproc) ReadUntil(delim byte) ([]byte, error)
- func (e *ExpectSubproc) ReadUntilUser(delim byte) ([]byte, error)
- func (e *ExpectSubproc) Send(cmd string) error
- func (e *ExpectSubproc) SendLine(cmd string) error
- func (e *ExpectSubproc) SendLineUser(cmd string) error
- func (e *ExpectSubproc) SendUser(cmd string) error
- func (e *ExpectSubproc) Start() error
- func (e *ExpectSubproc) Wait() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithoutEcho ¶
Types ¶
type ExpectPair ¶
type ExpectSubproc ¶
type ExpectSubproc struct {
// contains filtered or unexported fields
}
func Command ¶
func Command(cmd string) (*ExpectSubproc, error)
func Spawn ¶
func Spawn(cmd string) (*ExpectSubproc, error)
func (*ExpectSubproc) Close ¶
func (e *ExpectSubproc) Close() error
func (*ExpectSubproc) Debug ¶
func (e *ExpectSubproc) Debug(open bool)
func (*ExpectSubproc) Expect ¶
func (e *ExpectSubproc) Expect(searchStr string) error
func (*ExpectSubproc) ExpectMatch ¶
func (e *ExpectSubproc) ExpectMatch(regex string) (bool, error)
ExpectMatch checks whether a textual regular expression matches happened
func (*ExpectSubproc) ExpectMulti ¶
func (e *ExpectSubproc) ExpectMulti(pairs []ExpectPair) error
ExpectMulti test all patterns in sequence and do something according to the first matched pattern
func (*ExpectSubproc) ExpectMultiUser ¶
func (e *ExpectSubproc) ExpectMultiUser(pairs []ExpectPair) error
ExpectMultiUser read content from stdin and test match
func (*ExpectSubproc) ExpectUser ¶
func (e *ExpectSubproc) ExpectUser(searchStr string) error
ExpectUser read content from stdin and test match
func (*ExpectSubproc) Interact ¶
func (e *ExpectSubproc) Interact()
func (*ExpectSubproc) ReadLine ¶
func (e *ExpectSubproc) ReadLine() (string, error)
func (*ExpectSubproc) ReadLineUser ¶
func (e *ExpectSubproc) ReadLineUser() (string, error)
func (*ExpectSubproc) ReadUntilUser ¶
func (e *ExpectSubproc) ReadUntilUser(delim byte) ([]byte, error)
ReadUnitlUser read content from stdin
func (*ExpectSubproc) Send ¶
func (e *ExpectSubproc) Send(cmd string) error
func (*ExpectSubproc) SendLine ¶
func (e *ExpectSubproc) SendLine(cmd string) error
func (*ExpectSubproc) SendLineUser ¶
func (e *ExpectSubproc) SendLineUser(cmd string) error
func (*ExpectSubproc) SendUser ¶
func (e *ExpectSubproc) SendUser(cmd string) error
func (*ExpectSubproc) Start ¶
func (e *ExpectSubproc) Start() error
func (*ExpectSubproc) Wait ¶
func (e *ExpectSubproc) Wait() error
Click to show internal directories.
Click to hide internal directories.