goexpect icon indicating copy to clipboard operation
goexpect copied to clipboard

How to check if the match succeeded?

Open packetq opened this issue 4 years ago • 1 comments

Hi,

I'm fairly new to go and I'm having a hard time following the source. How can I determine if the regex match of the "Expect" function succeeded?

Thanks, -G

packetq avatar Sep 19 '21 08:09 packetq

use Verbose Option like below:

e, _, err := expect.Spawn("your command", -1, expect.Verbose(true))

haiboumich avatar Jan 05 '22 04:01 haiboumich