initialize externalRefresh chan
Vladimir Bauer
3 years ago
| 73 | 73 | func NewWithContext(ctx context.Context, options ...ContainerOption) *Progress { |
| 74 | 74 | ctx, cancel := context.WithCancel(ctx) |
| 75 | 75 | s := &pState{ |
| 76 | bHeap: priorityQueue{}, | |
| 77 | rows: make([]io.Reader, 0, 64), | |
| 78 | pool: make([]*Bar, 0, 64), | |
| 79 | rr: prr, | |
| 80 | queueBars: make(map[*Bar]*Bar), | |
| 81 | output: os.Stdout, | |
| 82 | popPriority: math.MinInt32, | |
| 83 | debugOut: io.Discard, | |
| 76 | rr: prr, | |
| 77 | bHeap: priorityQueue{}, | |
| 78 | rows: make([]io.Reader, 0, 64), | |
| 79 | pool: make([]*Bar, 0, 64), | |
| 80 | externalRefresh: make(chan interface{}), | |
| 81 | queueBars: make(map[*Bar]*Bar), | |
| 82 | output: os.Stdout, | |
| 83 | popPriority: math.MinInt32, | |
| 84 | debugOut: io.Discard, | |
| 84 | 85 | } |
| 85 | 86 | |
| 86 | 87 | for _, opt := range options { |