summaryrefslogtreecommitdiffstats
path: root/dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/decor/sizeb1000_string.go
blob: 3f32ef7152273c9fc4c2a10af0061ef7fafa0df2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Code generated by "stringer -type=SizeB1000 -trimprefix=_"; 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[_b-1]
	_ = x[_KB-1000]
	_ = x[_MB-1000000]
	_ = x[_GB-1000000000]
	_ = x[_TB-1000000000000]
}

const (
	_SizeB1000_name_0 = "b"
	_SizeB1000_name_1 = "KB"
	_SizeB1000_name_2 = "MB"
	_SizeB1000_name_3 = "GB"
	_SizeB1000_name_4 = "TB"
)

func (i SizeB1000) String() string {
	switch {
	case i == 1:
		return _SizeB1000_name_0
	case i == 1000:
		return _SizeB1000_name_1
	case i == 1000000:
		return _SizeB1000_name_2
	case i == 1000000000:
		return _SizeB1000_name_3
	case i == 1000000000000:
		return _SizeB1000_name_4
	default:
		return "SizeB1000(" + strconv.FormatInt(int64(i), 10) + ")"
	}
}