Fix missing errors in mmctl output (#30567)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
4156112f7c
Коммит
6c8235d031
@@ -222,7 +222,7 @@ func setValueWithConversion(val reflect.Value, newValue any) error {
|
||||
bits := val.Type().Bits()
|
||||
v, err := strconv.ParseInt(newValue.(string), 10, bits)
|
||||
if err != nil {
|
||||
return fmt.Errorf("target value is of type %v and provided value is not, err: %v", val.Kind(), err)
|
||||
return fmt.Errorf("target value is of type %v and provided value is not, err: %w", val.Kind(), err)
|
||||
}
|
||||
val.SetInt(v)
|
||||
return nil
|
||||
@@ -230,7 +230,7 @@ func setValueWithConversion(val reflect.Value, newValue any) error {
|
||||
bits := val.Type().Bits()
|
||||
v, err := strconv.ParseFloat(newValue.(string), bits)
|
||||
if err != nil {
|
||||
return fmt.Errorf("target value is of type %v and provided value is not, err: %v", val.Kind(), err)
|
||||
return fmt.Errorf("target value is of type %v and provided value is not, err: %w", val.Kind(), err)
|
||||
}
|
||||
val.SetFloat(v)
|
||||
return nil
|
||||
@@ -240,7 +240,7 @@ func setValueWithConversion(val reflect.Value, newValue any) error {
|
||||
case reflect.Bool:
|
||||
v, err := strconv.ParseBool(newValue.(string))
|
||||
if err != nil {
|
||||
return fmt.Errorf("target value is of type %v and provided value is not, err: %v", val.Kind(), err)
|
||||
return fmt.Errorf("target value is of type %v and provided value is not, err: %w", val.Kind(), err)
|
||||
}
|
||||
val.SetBool(v)
|
||||
return nil
|
||||
|
||||
Ссылка в новой задаче
Block a user