3
0

Make KV decoding (settings) more stable

This commit is contained in:
Denis Arh
2021-07-16 13:47:28 +02:00
parent 0cb917933b
commit a8545caaaa
+3 -2
View File
@@ -154,8 +154,9 @@ func DecodeKV(kv SettingsKV, dst interface{}, pp ...string) (err error) {
switch cnv := tmp.(type) {
case string:
num, _ := strconv.ParseUint(cnv, 10, 64)
structField.SetUint(num)
if num, err := strconv.ParseUint(cnv, 10, 64); err == nil {
structField.SetUint(num)
}
}
}
}