summaryrefslogtreecommitdiffstats
path: root/dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/decor/sizeb1024_string.go
diff options
context:
space:
mode:
Diffstat (limited to 'dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/decor/sizeb1024_string.go')
-rw-r--r--dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/decor/sizeb1024_string.go41
1 files changed, 41 insertions, 0 deletions
diff --git a/dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/decor/sizeb1024_string.go b/dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/decor/sizeb1024_string.go
new file mode 100644
index 0000000..9fca66c
--- /dev/null
+++ b/dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/decor/sizeb1024_string.go
@@ -0,0 +1,41 @@
+// Code generated by "stringer -type=SizeB1024 -trimprefix=_i"; DO NOT EDIT.
+
+package decor
+
+import "strconv"
+
+func _() {
+ // An "invalid array index" compiler error signifies that the constant values have changed.
+ // Re-run the stringer command to generate them again.
+ var x [1]struct{}
+ _ = x[_ib-1]
+ _ = x[_iKiB-1024]
+ _ = x[_iMiB-1048576]
+ _ = x[_iGiB-1073741824]
+ _ = x[_iTiB-1099511627776]
+}
+
+const (
+ _SizeB1024_name_0 = "b"
+ _SizeB1024_name_1 = "KiB"
+ _SizeB1024_name_2 = "MiB"
+ _SizeB1024_name_3 = "GiB"
+ _SizeB1024_name_4 = "TiB"
+)
+
+func (i SizeB1024) String() string {
+ switch {
+ case i == 1:
+ return _SizeB1024_name_0
+ case i == 1024:
+ return _SizeB1024_name_1
+ case i == 1048576:
+ return _SizeB1024_name_2
+ case i == 1073741824:
+ return _SizeB1024_name_3
+ case i == 1099511627776:
+ return _SizeB1024_name_4
+ default:
+ return "SizeB1024(" + strconv.FormatInt(int64(i), 10) + ")"
+ }
+}