minor: godoc edit
Vladimir Bauer
1 year, 10 months ago
| 155 | 155 | } |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | // TraverseDecorators traverses all available decorators and calls cb func on each. | |
| 158 | // TraverseDecorators traverses available decorators and calls cb func | |
| 159 | // on each in a new goroutine. Decorators implementing decor.Wrapper | |
| 160 | // interface are unwrapped first. | |
| 159 | 161 | func (b *Bar) TraverseDecorators(cb func(decor.Decorator)) { |
| 160 | 162 | select { |
| 161 | 163 | case b.operateState <- func(s *bState) { |
| 326 | 328 | } |
| 327 | 329 | } |
| 328 | 330 | |
| 329 | // DecoratorAverageAdjust adjusts decorators which implement decor.AverageDecorator interface. | |
| 331 | // DecoratorAverageAdjust adjusts decorators implementing decor.AverageDecorator interface. | |
| 330 | 332 | // Call if there is need to set start time after decorators have been constructed. |
| 331 | 333 | func (b *Bar) DecoratorAverageAdjust(start time.Time) { |
| 332 | 334 | b.TraverseDecorators(func(d decor.Decorator) { |