diff --git a/bar.go b/bar.go index 8e7f539..ff61ff3 100644 --- a/bar.go +++ b/bar.go @@ -53,7 +53,7 @@ till int64 } state struct { - id int64 + id int format formatRunes etaAlpha float64 barWidth int @@ -70,7 +70,7 @@ } ) -func newBar(ctx context.Context, wg *sync.WaitGroup, id, total int64, width int, format string) *Bar { +func newBar(ctx context.Context, wg *sync.WaitGroup, id int, total int64, width int, format string) *Bar { b := &Bar{ formatElementCh: make(chan runeFormatElement), etaAlphaCh: make(chan float64), @@ -220,7 +220,7 @@ } // GetID returs id of the bar -func (b *Bar) GetID() int64 { +func (b *Bar) GetID() int { state := b.getState() return state.id } @@ -289,7 +289,7 @@ return state.draw(termWidth) } -func (b *Bar) server(ctx context.Context, wg *sync.WaitGroup, id, total int64, width int, format string) { +func (b *Bar) server(ctx context.Context, wg *sync.WaitGroup, id int, total int64, width int, format string) { var completed bool timeStarted := time.Now() blockStartTime := timeStarted diff --git a/progress.go b/progress.go index e960862..00d459e 100644 --- a/progress.go +++ b/progress.go @@ -139,7 +139,7 @@ // AddBarWithID creates a new progress bar and adds to the container // pancis, if called on stopped Progress instance, i.e after Stop() -func (p *Progress) AddBarWithID(id, total int64) *Bar { +func (p *Progress) AddBarWithID(id int, total int64) *Bar { if IsClosed(p.done) { panic(ErrCallAfterStop) }