Skip to content

Commit 33b7c9d

Browse files
committed
config: Don't truncate float64 to int
1 parent 8b31dc7 commit 33b7c9d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/config/settings.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,11 +456,11 @@ func GetNativeValue(option string, realValue interface{}, value string) (interfa
456456
} else if kind == reflect.String {
457457
native = value
458458
} else if kind == reflect.Float64 {
459-
i, err := strconv.Atoi(value)
459+
f, err := strconv.ParseFloat(value, 64)
460460
if err != nil {
461461
return nil, ErrInvalidValue
462462
}
463-
native = float64(i)
463+
native = f
464464
} else {
465465
return nil, ErrInvalidValue
466466
}

0 commit comments

Comments
 (0)