From 4cfb3a9245cf81444bbb711214bde6f9320c459b Mon Sep 17 00:00:00 2001 From: "Dr. Tobias Quathamer" Date: Sat, 1 Sep 2018 22:43:37 +0200 Subject: [PATCH] Handle int64 separately for 32 bit architectures --- viper.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/viper.go b/viper.go index cfa1241..051a3ef 100644 --- a/viper.go +++ b/viper.go @@ -648,8 +648,10 @@ func (v *Viper) Get(key string) interface{} { return cast.ToBool(val) case string: return cast.ToString(val) - case int64, int32, int16, int8, int: + case int32, int16, int8, int: return cast.ToInt(val) + case int64: + return cast.ToInt64(val) case float64, float32: return cast.ToFloat64(val) case time.Time: