Re: [go-nuts] go test fails - appear that it misses capturing stdout

2017-09-28 Thread Ayan George
On 09/28/2017 07:29 PM, gocss wrote: > first the code follow by output from 'go test -v' > Also, you can sort of fix this by copying os.Stdout within the example instead of the global var () section like: // this does not fail because iowr is a copy of os.Stdout after // it has been 'hijacked'

Re: [go-nuts] go test fails - appear that it misses capturing stdout

2017-09-28 Thread Ayan George
On 09/28/2017 07:29 PM, gocss wrote: > first the code follow by output from 'go test -v' > Take a look at src/testing/example.go around line 15. The testing code temporarily re-assigns os.Stdout for the duration of the Example. It sets it to one of the end of a pipe that it uses to capture th