Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteBytesIfPrompt ¶
func WriteBytesIfPrompt(ctx context.Context, b []byte, writer io.Writer, exp *regexp.Regexp, reader io.Reader) error
WriteBytesIfPrompt writes b into writer once exp got matched in content that is read from reader. A context can be given to control this process with extra mechanism, such as timeout. Error will be returned if encountered any. Also keep in mind that b must be end with `\n` to finalize input on console interactions.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.