Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CapturedOutput ¶
type CapturedOutput struct {
// contains filtered or unexported fields
}
func CaptureOutput ¶
func CaptureOutput(t *testing.T) *CapturedOutput
CaptureOutput replaces os.Stdout and os.Stderr with new pipes, that will write output to buffers. Buffers are accessible by calling Done on returned struct.
os.Stdout and os.Stderr must be reverted to previous values manually.
func (*CapturedOutput) Done ¶
func (co *CapturedOutput) Done() (stdout string, stderr string)
Done waits until all captured output has been written to buffers, and then returns the buffers.
Click to show internal directories.
Click to hide internal directories.