mirror of
https://github.com/spf13/viper
synced 2025-05-07 20:57:18 +00:00
Handle int64 separately for 32 bit architectures
This commit is contained in:
parent
8addaed22d
commit
4cfb3a9245
1 changed files with 3 additions and 1 deletions
4
viper.go
4
viper.go
|
@ -648,8 +648,10 @@ func (v *Viper) Get(key string) interface{} {
|
||||||
return cast.ToBool(val)
|
return cast.ToBool(val)
|
||||||
case string:
|
case string:
|
||||||
return cast.ToString(val)
|
return cast.ToString(val)
|
||||||
case int64, int32, int16, int8, int:
|
case int32, int16, int8, int:
|
||||||
return cast.ToInt(val)
|
return cast.ToInt(val)
|
||||||
|
case int64:
|
||||||
|
return cast.ToInt64(val)
|
||||||
case float64, float32:
|
case float64, float32:
|
||||||
return cast.ToFloat64(val)
|
return cast.ToFloat64(val)
|
||||||
case time.Time:
|
case time.Time:
|
||||||
|
|
Loading…
Add table
Reference in a new issue