suppress example: one defer
Vladimir Bauer
6 years ago
| 59 | 59 | return func(w io.Writer, width int, st *decor.Statistics) { |
| 60 | 60 | select { |
| 61 | 61 | case m := <-ch: |
| 62 | if f, ok := filler.(refiller); ok { | |
| 63 | defer f.SetRefill(st.Current) | |
| 64 | } | |
| 65 | 62 | defer func() { |
| 63 | if f, ok := filler.(refiller); ok { | |
| 64 | f.SetRefill(st.Current) | |
| 65 | } | |
| 66 | 66 | msg = &m |
| 67 | 67 | }() |
| 68 | 68 | nextCh <- struct{}{} |