(timeout time.Duration)
| 45 | } |
| 46 | |
| 47 | func (this *Cmd) WithTimeout(timeout time.Duration) *Cmd { |
| 48 | this.timeout = timeout |
| 49 | |
| 50 | ctx, cancelFunc := context.WithTimeout(context.Background(), timeout) |
| 51 | this.ctx = ctx |
| 52 | this.cancelFunc = cancelFunc |
| 53 | |
| 54 | return this |
| 55 | } |
| 56 | |
| 57 | func (this *Cmd) WithStdout() *Cmd { |
| 58 | this.captureStdout = true |
no outgoing calls
no test coverage detected