File: doc.go

package info (click to toggle)
golang-github-vbauerster-mpb 8.8.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,044 kB
  • sloc: sh: 7; makefile: 3
file content (19 lines) | stat: -rw-r--r-- 661 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Package decor provides common decorators for "github.com/vbauerster/mpb/v8" module.
//
// Some decorators returned by this package might have a closure state. It is ok to use
// decorators concurrently, unless you share the same decorator among multiple
// *mpb.Bar instances. To avoid data races, create new decorator per *mpb.Bar instance.
//
// Don't:
//
//	p := mpb.New()
//	name := decor.Name("bar")
//	p.AddBar(100, mpb.AppendDecorators(name))
//	p.AddBar(100, mpb.AppendDecorators(name))
//
// Do:
//
//	p := mpb.New()
//	p.AddBar(100, mpb.AppendDecorators(decor.Name("bar1")))
//	p.AddBar(100, mpb.AppendDecorators(decor.Name("bar2")))
package decor