mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 18:43:34 +00:00
rebase: update k8s.io packages to v0.29.0
Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
committed by
mergify[bot]
parent
328a264202
commit
f080b9e0c9
6
vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go
generated
vendored
6
vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go
generated
vendored
@ -72,14 +72,14 @@ func FromString(val string) IntOrString {
|
||||
return IntOrString{Type: String, StrVal: val}
|
||||
}
|
||||
|
||||
// Parse the given string and try to convert it to an integer before
|
||||
// Parse the given string and try to convert it to an int32 integer before
|
||||
// setting it as a string value.
|
||||
func Parse(val string) IntOrString {
|
||||
i, err := strconv.Atoi(val)
|
||||
i, err := strconv.ParseInt(val, 10, 32)
|
||||
if err != nil {
|
||||
return FromString(val)
|
||||
}
|
||||
return FromInt(i)
|
||||
return FromInt32(int32(i))
|
||||
}
|
||||
|
||||
// UnmarshalJSON implements the json.Unmarshaller interface.
|
||||
|
Reference in New Issue
Block a user