Exemple #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()))
}
Exemple #2
0
func (sw *SpinningWriter) Write(p []byte) (n int, err error) {
	defer func() { sw.wrote += size.Capacity(n) }()
	return sw.w.Write(p)
}