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'.
func ExampleX1() {
var iowr io.Writer = os.Stdout
Trace = log.New(iowr, "trace:", 0)
Trace.Println("123")
// Output: trace:123
}
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.