diff --git a/_examples/barExtender/main.go b/_examples/barExtender/main.go index 0d5d2d5..5b2f117 100644 --- a/_examples/barExtender/main.go +++ b/_examples/barExtender/main.go @@ -19,7 +19,7 @@ for i := 0; i < numBars; i++ { name := fmt.Sprintf("Bar#%d:", i) - efn := func(w io.Writer, width int, s *decor.Statistics) { + efn := func(w io.Writer, width int, s decor.Statistics) { if s.Completed { fmt.Fprintf(w, "Bar id: %d has been completed\n", s.ID) } diff --git a/_examples/merge/main.go b/_examples/merge/main.go index 03a5817..2406955 100644 --- a/_examples/merge/main.go +++ b/_examples/merge/main.go @@ -63,7 +63,7 @@ func newVariadicSpinner(wc decor.WC) decor.Decorator { spinner := decor.Spinner(nil) - f := func(s *decor.Statistics) string { + f := func(s decor.Statistics) string { return strings.Repeat(spinner.Decor(s), int(s.Current/3)) } return decor.Any(f, wc) diff --git a/_examples/panic/main.go b/_examples/panic/main.go index 1a7cfc1..83c3344 100644 --- a/_examples/panic/main.go +++ b/_examples/panic/main.go @@ -35,7 +35,7 @@ } func panicDecorator(name, panicMsg string) decor.Decorator { - return decor.Any(func(s *decor.Statistics) string { + return decor.Any(func(s decor.Statistics) string { if s.ID == 1 && s.Current >= 42 { panic(panicMsg) } diff --git a/_examples/poplog/main.go b/_examples/poplog/main.go index 3ff054a..74d976d 100644 --- a/_examples/poplog/main.go +++ b/_examples/poplog/main.go @@ -64,7 +64,7 @@ func makeLogBar(msg string) mpb.BarFiller { limit := "%%.%ds" - return mpb.BarFillerFunc(func(w io.Writer, width int, st *decor.Statistics) { + return mpb.BarFillerFunc(func(w io.Writer, width int, st decor.Statistics) { fmt.Fprintf(w, fmt.Sprintf(limit, width), msg) }) } diff --git a/_examples/suppressBar/main.go b/_examples/suppressBar/main.go index 906f2f9..6346f32 100644 --- a/_examples/suppressBar/main.go +++ b/_examples/suppressBar/main.go @@ -89,7 +89,7 @@ base := mpb.NewBarFiller(mpb.DefaultBarStyle, false) nextCh := make(chan struct{}, 1) var msg *string - filler := mpb.BarFillerFunc(func(w io.Writer, width int, st *decor.Statistics) { + filler := mpb.BarFillerFunc(func(w io.Writer, width int, st decor.Statistics) { select { case m := <-ch: defer func() { @@ -117,7 +117,7 @@ func newCustomPercentage(ch <-chan struct{}) decor.Decorator { base := decor.Percentage() - f := func(s *decor.Statistics) string { + fn := func(s decor.Statistics) string { select { case <-ch: return "" @@ -125,5 +125,5 @@ return base.Decor(s) } } - return decor.Any(f) + return decor.Any(fn) }