Consice interface
Vladimir Bauer
8 years ago
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | type Decorator interface { |
| 54 | Decor(s *Statistics, widthAccumulator chan<- int, widthDistributor <-chan int) string | |
| 54 | Decor(*Statistics, chan<- int, <-chan int) string | |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | type CompleteMessenger interface { |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | // DecoratorFunc is an adapter for Decorator interface |
| 62 | type DecoratorFunc func(s *Statistics, widthAccumulator chan<- int, widthDistributor <-chan int) string | |
| 62 | type DecoratorFunc func(*Statistics, chan<- int, <-chan int) string | |
| 63 | 63 | |
| 64 | 64 | func (f DecoratorFunc) Decor(s *Statistics, widthAccumulator chan<- int, widthDistributor <-chan int) string { |
| 65 | 65 | return f(s, widthAccumulator, widthDistributor) |