func newDebug() *debugContainer { d := debugContainer{ cn: atomic.AddUint64(&cn, 1), rn: 0, } if !debug.Enabled() { return nil } d.log = debug.NewFile(fmt.Sprintf("%d-client.log", d.cn)) return &d }
func (d *debugRoundTrip) newFile(suffix string) io.WriteCloser { return debug.NewFile(fmt.Sprintf("%d-%04d.%s", d.cn, d.rn, suffix)) }