fix(config): clean code (#1311)

pull/1312/head
寻寻觅觅的Gopher 3 years ago committed by GitHub
parent ff78611766
commit 6e65616e31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      config/value.go

@ -49,7 +49,7 @@ func (v *atomicValue) Int() (int64, error) {
case int32:
return int64(val), nil
case int64:
return int64(val), nil
return val, nil
case float64:
return int64(val), nil
case string:
@ -60,7 +60,7 @@ func (v *atomicValue) Int() (int64, error) {
func (v *atomicValue) Float() (float64, error) {
switch val := v.Load().(type) {
case float64:
return float64(val), nil
return val, nil
case int:
return float64(val), nil
case int32:

Loading…
Cancel
Save