Esempio n. 1
0
func (sw *SpinningWriter) String() string {
	return fmt.Sprintf("%v\t%v\t%v/s", sw.wrote, sw.ela, size.Capacity(float64(sw.wrote)/sw.ela.Duration().Seconds()))
}
Esempio n. 2
0
func (sw *SpinningWriter) Write(p []byte) (n int, err error) {
	defer func() { sw.wrote += size.Capacity(n) }()
	return sw.w.Write(p)
}