From 14f57a261f17b456eff15f173e46e4052bc3b7db Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Tue, 7 Jan 2025 01:50:12 +0800 Subject: [PATCH 1/2] fix typos Found via `typos --hidden --format brief` --- _examples/decoratorsOnTop/main.go | 2 +- bar.go | 6 +++--- decor/eta.go | 2 +- progress.go | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/_examples/decoratorsOnTop/main.go b/_examples/decoratorsOnTop/main.go index f35ad823..3220bc64 100644 --- a/_examples/decoratorsOnTop/main.go +++ b/_examples/decoratorsOnTop/main.go @@ -15,7 +15,7 @@ func main() { total := 100 bar := p.New(int64(total), mpb.NopStyle(), // make main bar style nop, so there are just decorators - mpb.BarExtender(extended(mpb.BarStyle().Build()), false), // extend wtih normal bar on the next line + mpb.BarExtender(extended(mpb.BarStyle().Build()), false), // extend with normal bar on the next line mpb.PrependDecorators( decor.Name("Percentage: "), decor.NewPercentage("%d"), diff --git a/bar.go b/bar.go index 73753f02..a76f51d4 100644 --- a/bar.go +++ b/bar.go @@ -117,7 +117,7 @@ func (b *Bar) ProxyWriter(w io.Writer) io.WriteCloser { } } -// ID returs id of the bar. +// ID returns id of the bar. func (b *Bar) ID() int { result := make(chan int) select { @@ -180,7 +180,7 @@ func (b *Bar) TraverseDecorators(cb func(decor.Decorator)) { } // EnableTriggerComplete enables triggering complete event. It's effective -// only for bars which were constructed with `total <= 0`. If `curren >= total` +// only for bars which were constructed with `total <= 0`. If `current >= total` // at the moment of call, complete event is triggered right away. func (b *Bar) EnableTriggerComplete() { select { @@ -493,7 +493,7 @@ func (b *Bar) wSyncTable() syncTable { func (s *bState) draw(stat decor.Statistics) (_ io.Reader, err error) { decorFiller := func(buf *bytes.Buffer, decorators []decor.Decorator) (err error) { for _, d := range decorators { - // need to call Decor in any case becase of width synchronization + // need to call Decor in any case because of width synchronization str, width := d.Decor(stat) if err != nil { continue diff --git a/decor/eta.go b/decor/eta.go index bf48d3ee..d8fcc2b9 100644 --- a/decor/eta.go +++ b/decor/eta.go @@ -15,7 +15,7 @@ var ( _ AverageDecorator = (*averageETA)(nil) ) -// TimeNormalizer interface. Implementors could be passed into +// TimeNormalizer interface. Implementers could be passed into // MovingAverageETA, in order to affect i.e. normalize its output. type TimeNormalizer interface { Normalize(time.Duration) time.Duration diff --git a/progress.go b/progress.go index b2e4e4ee..6979fdb2 100644 --- a/progress.go +++ b/progress.go @@ -39,7 +39,7 @@ type pState struct { idCount int popPriority int - // following are provided/overrided by user + // following are provided/overrode by user hmQueueLen int reqWidth int refreshRate time.Duration From c1e694c3c1d07d58ec926980a1038e0f66718d4a Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Sun, 19 Jan 2025 15:51:59 +0800 Subject: [PATCH 2/2] Kian-Meng Ang Copyright Waiver I dedicate any and all copyright interest in this software to the public domain. I make this dedication for the benefit of the public at large and to the detriment of my heirs and successors. I intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.