minor: prefer var wg
Vladimir Bauer
3 years ago
| 529 | 529 | } |
| 530 | 530 | |
| 531 | 531 | func (s bState) decoratorEwmaUpdate(dur time.Duration) { |
| 532 | wg := new(sync.WaitGroup) | |
| 532 | var wg sync.WaitGroup | |
| 533 | 533 | for i := 0; i < len(s.ewmaDecorators); i++ { |
| 534 | 534 | switch d := s.ewmaDecorators[i]; i { |
| 535 | 535 | case len(s.ewmaDecorators) - 1: |
| 546 | 546 | } |
| 547 | 547 | |
| 548 | 548 | func (s bState) decoratorAverageAdjust(start time.Time) { |
| 549 | wg := new(sync.WaitGroup) | |
| 549 | var wg sync.WaitGroup | |
| 550 | 550 | for i := 0; i < len(s.averageDecorators); i++ { |
| 551 | 551 | switch d := s.averageDecorators[i]; i { |
| 552 | 552 | case len(s.averageDecorators) - 1: |
| 563 | 563 | } |
| 564 | 564 | |
| 565 | 565 | func (s bState) decoratorShutdownNotify() { |
| 566 | wg := new(sync.WaitGroup) | |
| 566 | var wg sync.WaitGroup | |
| 567 | 567 | for i := 0; i < len(s.shutdownListeners); i++ { |
| 568 | 568 | switch d := s.shutdownListeners[i]; i { |
| 569 | 569 | case len(s.shutdownListeners) - 1: |