diff --git a/bar.go b/bar.go index 25a9e1b..c05ec42 100644 --- a/bar.go +++ b/bar.go @@ -42,7 +42,7 @@ recoveredPanic interface{} } -type extFunc func(in io.Reader, reqWidth int, st decor.Statistics) (out io.Reader, lines int) +type extenderFunc func(in io.Reader, reqWidth int, st decor.Statistics) (out io.Reader, lines int) type bState struct { id int @@ -67,7 +67,7 @@ bufP, bufB, bufA *bytes.Buffer filler BarFiller middleware func(BarFiller) BarFiller - extender extFunc + extender extenderFunc // runningBar is a key for *pState.parkedBars runningBar *Bar @@ -475,7 +475,7 @@ } } -func makePanicExtender(p interface{}) extFunc { +func makePanicExtender(p interface{}) extenderFunc { pstr := fmt.Sprint(p) stack := debug.Stack() stackLines := bytes.Count(stack, []byte("\n")) diff --git a/bar_option.go b/bar_option.go index d26c0b2..e359c11 100644 --- a/bar_option.go +++ b/bar_option.go @@ -111,11 +111,11 @@ return nil } return func(s *bState) { - s.extender = makeExtFunc(filler) + s.extender = makeExtenderFunc(filler) } } -func makeExtFunc(filler BarFiller) extFunc { +func makeExtenderFunc(filler BarFiller) extenderFunc { buf := new(bytes.Buffer) return func(r io.Reader, reqWidth int, st decor.Statistics) (io.Reader, int) { filler.Fill(buf, reqWidth, st)