@@ -43,7 +43,7 @@ const (
43
43
func RoundUpToGiB (size resource.Quantity ) (int64 , error ) {
44
44
requestBytes , ok := size .AsInt64 ()
45
45
if ! ok {
46
- return 0 , fmt .Errorf ("quantity %v is too great, overflows int64" , size )
46
+ return 0 , fmt .Errorf ("quantity %s is too great, overflows int64" , size . String () )
47
47
}
48
48
return roundUpSize (requestBytes , GiB ), nil
49
49
}
@@ -52,7 +52,7 @@ func RoundUpToGiB(size resource.Quantity) (int64, error) {
52
52
func RoundUpToMB (size resource.Quantity ) (int64 , error ) {
53
53
requestBytes , ok := size .AsInt64 ()
54
54
if ! ok {
55
- return 0 , fmt .Errorf ("quantity %v is too great, overflows int64" , size )
55
+ return 0 , fmt .Errorf ("quantity %s is too great, overflows int64" , size . String () )
56
56
}
57
57
return roundUpSize (requestBytes , MB ), nil
58
58
}
@@ -61,7 +61,7 @@ func RoundUpToMB(size resource.Quantity) (int64, error) {
61
61
func RoundUpToMiB (size resource.Quantity ) (int64 , error ) {
62
62
requestBytes , ok := size .AsInt64 ()
63
63
if ! ok {
64
- return 0 , fmt .Errorf ("quantity %v is too great, overflows int64" , size )
64
+ return 0 , fmt .Errorf ("quantity %s is too great, overflows int64" , size . String () )
65
65
}
66
66
return roundUpSize (requestBytes , MiB ), nil
67
67
}
@@ -70,7 +70,7 @@ func RoundUpToMiB(size resource.Quantity) (int64, error) {
70
70
func RoundUpToKB (size resource.Quantity ) (int64 , error ) {
71
71
requestBytes , ok := size .AsInt64 ()
72
72
if ! ok {
73
- return 0 , fmt .Errorf ("quantity %v is too great, overflows int64" , size )
73
+ return 0 , fmt .Errorf ("quantity %s is too great, overflows int64" , size . String () )
74
74
}
75
75
return roundUpSize (requestBytes , KB ), nil
76
76
}
@@ -79,7 +79,7 @@ func RoundUpToKB(size resource.Quantity) (int64, error) {
79
79
func RoundUpToKiB (size resource.Quantity ) (int64 , error ) {
80
80
requestBytes , ok := size .AsInt64 ()
81
81
if ! ok {
82
- return 0 , fmt .Errorf ("quantity %v is too great, overflows int64" , size )
82
+ return 0 , fmt .Errorf ("quantity %s is too great, overflows int64" , size . String () )
83
83
}
84
84
return roundUpSize (requestBytes , KiB ), nil
85
85
}
@@ -89,7 +89,7 @@ func RoundUpToKiB(size resource.Quantity) (int64, error) {
89
89
func RoundUpToGiBInt (size resource.Quantity ) (int , error ) {
90
90
requestBytes , ok := size .AsInt64 ()
91
91
if ! ok {
92
- return 0 , fmt .Errorf ("quantity %v is too great, overflows int64" , size )
92
+ return 0 , fmt .Errorf ("quantity %s is too great, overflows int64" , size . String () )
93
93
}
94
94
return roundUpSizeInt (requestBytes , GiB )
95
95
}
@@ -99,7 +99,7 @@ func RoundUpToGiBInt(size resource.Quantity) (int, error) {
99
99
func RoundUpToMBInt (size resource.Quantity ) (int , error ) {
100
100
requestBytes , ok := size .AsInt64 ()
101
101
if ! ok {
102
- return 0 , fmt .Errorf ("quantity %v is too great, overflows int64" , size )
102
+ return 0 , fmt .Errorf ("quantity %s is too great, overflows int64" , size . String () )
103
103
}
104
104
return roundUpSizeInt (requestBytes , MB )
105
105
}
@@ -109,7 +109,7 @@ func RoundUpToMBInt(size resource.Quantity) (int, error) {
109
109
func RoundUpToMiBInt (size resource.Quantity ) (int , error ) {
110
110
requestBytes , ok := size .AsInt64 ()
111
111
if ! ok {
112
- return 0 , fmt .Errorf ("quantity %v is too great, overflows int64" , size )
112
+ return 0 , fmt .Errorf ("quantity %s is too great, overflows int64" , size . String () )
113
113
}
114
114
return roundUpSizeInt (requestBytes , MiB )
115
115
}
@@ -119,7 +119,7 @@ func RoundUpToMiBInt(size resource.Quantity) (int, error) {
119
119
func RoundUpToKBInt (size resource.Quantity ) (int , error ) {
120
120
requestBytes , ok := size .AsInt64 ()
121
121
if ! ok {
122
- return 0 , fmt .Errorf ("quantity %v is too great, overflows int64" , size )
122
+ return 0 , fmt .Errorf ("quantity %s is too great, overflows int64" , size . String () )
123
123
}
124
124
return roundUpSizeInt (requestBytes , KB )
125
125
}
@@ -136,7 +136,7 @@ func RoundUpToKiBInt(size resource.Quantity) (int, error) {
136
136
func RoundUpToGiBInt32 (size resource.Quantity ) (int32 , error ) {
137
137
requestBytes , ok := size .AsInt64 ()
138
138
if ! ok {
139
- return 0 , fmt .Errorf ("quantity %v is too great, overflows int64" , size )
139
+ return 0 , fmt .Errorf ("quantity %s is too great, overflows int64" , size . String () )
140
140
}
141
141
return roundUpSizeInt32 (requestBytes , GiB )
142
142
}
0 commit comments