newCapturedOutput creates a new value to override the streams.
()
| 103 | |
| 104 | // newCapturedOutput creates a new value to override the streams. |
| 105 | func newCapturedOutput() capturedOutput { |
| 106 | return capturedOutput{ |
| 107 | oldOut: Out, |
| 108 | oldErr: Err, |
| 109 | newOut: io.Discard, |
| 110 | newErr: io.Discard, |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | // override sets the package variables to the fake streams. |
| 115 | func (co capturedOutput) override() { |
no outgoing calls
no test coverage detected