Codebase list golang-github-vbauerster-mpb / a13acc8
buf.Reset at panic and end Vladimir Bauer 3 years ago
1 changed file(s) with 2 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
129129 func makeExtenderFunc(filler BarFiller, rev bool) extenderFunc {
130130 buf := new(bytes.Buffer)
131131 base := func(rows []io.Reader, stat decor.Statistics) []io.Reader {
132 buf.Reset()
133132 err := filler.Fill(buf, stat)
134133 if err != nil {
134 buf.Reset()
135135 panic(err)
136136 }
137137 for {
141141 }
142142 rows = append(rows, bytes.NewReader(b))
143143 }
144 buf.Reset()
144145 return rows
145146 }
146147