diff --git a/README.md b/README.md index 7a7b189..36a8bf2 100644 --- a/README.md +++ b/README.md @@ -43,9 +43,9 @@ // adding a single bar bar := p.AddBar(int64(total), mpb.PrependDecorators( - // Display our name with one space on the right + // display our name with one space on the right decor.Name(name, decor.WC{W: len(name) + 1, C: decor.DidentRight}), - // Replace ETA decorator with "done" message, OnComplete event + // replace ETA decorator with "done" message, OnComplete event decor.OnComplete( // ETA decorator with default eta age, and width reservation of 4 decor.ETA(decor.ET_STYLE_GO, 0, startBlock, decor.WC{W: 4}), "done", @@ -60,7 +60,7 @@ // update start block time, required for ETA calculation startBlock <- time.Now() time.Sleep(time.Duration(rand.Intn(10)+1) * max / 10) - // Increment by 1 (there is bar.IncrBy(int) method, if needed) + // increment by 1 (there is bar.IncrBy(int) method, if needed) bar.Increment() } // wait for our bar to complete and flush @@ -79,13 +79,13 @@ startBlock := make(chan time.Time) bar := p.AddBar(int64(total), mpb.PrependDecorators( - // Display our name with one space on the right + // display our name with one space on the right decor.Name(name, decor.WC{W: len(name) + 1, C: decor.DidentRight}), // decor.DSyncWidth bit enables same column width synchronization decor.Percentage(decor.WCSyncWidth), ), mpb.AppendDecorators( - // Replace ETA decorator with "done" message, OnComplete event + // replace ETA decorator with "done" message, OnComplete event decor.OnComplete( // ETA decorator with default eta age, and width reservation of 3 decor.ETA(decor.ET_STYLE_GO, 0, startBlock, decor.WC{W: 3}), "done", diff --git a/example_test.go b/example_test.go index 65ae1e4..0dc96ad 100644 --- a/example_test.go +++ b/example_test.go @@ -27,18 +27,15 @@ // adding a single bar bar := p.AddBar(int64(total), mpb.PrependDecorators( - // Display our name with one space on the right + // display our name with one space on the right decor.Name(name, decor.WC{W: len(name) + 1, C: decor.DidentRight}), - // Replace ETA decorator with message, OnComplete event + // replace ETA decorator with "done" message, OnComplete event decor.OnComplete( // ETA decorator with default eta age, and width reservation of 4 - decor.ETA(decor.ET_STYLE_GO, 0, startBlock, decor.WC{W: 4}), - "done", + decor.ETA(decor.ET_STYLE_GO, 0, startBlock, decor.WC{W: 4}), "done", ), ), - mpb.AppendDecorators( - decor.Percentage(), - ), + mpb.AppendDecorators(decor.Percentage()), ) // simulating some work @@ -47,7 +44,7 @@ // update start block time, required for ETA calculation startBlock <- time.Now() time.Sleep(time.Duration(rand.Intn(10)+1) * max / 10) - // Increment by 1 (there is bar.IncrBy(int) method, if needed) + // increment by 1 (there is bar.IncrBy(int) method, if needed) bar.Increment() } // wait for our bar to complete and flush diff --git a/examples/simple/main.go b/examples/simple/main.go index 0260271..4f009d1 100644 --- a/examples/simple/main.go +++ b/examples/simple/main.go @@ -25,13 +25,13 @@ startBlock := make(chan time.Time) bar := p.AddBar(int64(total), mpb.PrependDecorators( - // Display our name with one space on the right + // display our name with one space on the right decor.Name(name, decor.WC{W: len(name) + 1, C: decor.DidentRight}), // decor.DSyncWidth bit enables same column width synchronization decor.Percentage(decor.WCSyncWidth), ), mpb.AppendDecorators( - // Replace ETA decorator with "done" message, OnComplete event + // replace ETA decorator with "done" message, OnComplete event decor.OnComplete( // ETA decorator with default eta age, and width reservation of 3 decor.ETA(decor.ET_STYLE_GO, 0, startBlock, decor.WC{W: 3}), "done", diff --git a/examples/singleBar/main.go b/examples/singleBar/main.go index df96107..60f9e2b 100644 --- a/examples/singleBar/main.go +++ b/examples/singleBar/main.go @@ -24,9 +24,9 @@ // adding a single bar bar := p.AddBar(int64(total), mpb.PrependDecorators( - // Display our name with one space on the right + // display our name with one space on the right decor.Name(name, decor.WC{W: len(name) + 1, C: decor.DidentRight}), - // Replace ETA decorator with "done" message, OnComplete event + // replace ETA decorator with "done" message, OnComplete event decor.OnComplete( // ETA decorator with default eta age, and width reservation of 4 decor.ETA(decor.ET_STYLE_GO, 0, startBlock, decor.WC{W: 4}), "done", @@ -41,7 +41,7 @@ // update start block time, required for ETA calculation startBlock <- time.Now() time.Sleep(time.Duration(rand.Intn(10)+1) * max / 10) - // Increment by 1 (there is bar.IncrBy(int) method, if needed) + // increment by 1 (there is bar.IncrBy(int) method, if needed) bar.Increment() } // wait for our bar to complete and flush