summaryrefslogtreecommitdiff
path: root/vendor/github.com/vbauerster/mpb/decor/doc.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/vbauerster/mpb/decor/doc.go')
-rw-r--r--vendor/github.com/vbauerster/mpb/decor/doc.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/vendor/github.com/vbauerster/mpb/decor/doc.go b/vendor/github.com/vbauerster/mpb/decor/doc.go
new file mode 100644
index 000000000..561a8677c
--- /dev/null
+++ b/vendor/github.com/vbauerster/mpb/decor/doc.go
@@ -0,0 +1,25 @@
+// Copyright (C) 2016-2018 Vladimir Bauer
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+/*
+ Package decor contains common decorators used by "github.com/vbauerster/mpb" package.
+
+ 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