diff --git a/example/sort/main.go b/example/sort/main.go index 09912f7..567b8d5 100644 --- a/example/sort/main.go +++ b/example/sort/main.go @@ -14,7 +14,7 @@ func main() { - p := mpb.New().RefreshRate(80 * time.Millisecond).Sort(mpb.SortTop).SetWidth(60) + p := mpb.New().RefreshRate(80 * time.Millisecond).WithSort(mpb.SortTop).SetWidth(60) bar1 := p.AddBar(100).AppendETA().PrependFunc(getDecor("Bar#1")) go func() { diff --git a/progress.go b/progress.go index 6e7d90d..774bc24 100644 --- a/progress.go +++ b/progress.go @@ -84,7 +84,7 @@ return p } -func (p *Progress) Sort(sort SortType) *Progress { +func (p *Progress) WithSort(sort SortType) *Progress { p.sort = sort return p }