diff --git a/convert.go b/convert.go index 065175f..9e6071d 100644 --- a/convert.go +++ b/convert.go @@ -4,19 +4,19 @@ type intConverter func(interface{}) int64 func getIntConverter(data interface{}) intConverter { switch data.(type) { - case (int): + case int: return func(i interface{}) int64 { return int64(i.(int)) } - case (int8): + case int8: return func(i interface{}) int64 { return int64(i.(int8)) } - case (int16): + case int16: return func(i interface{}) int64 { return int64(i.(int16)) } - case (int32): + case int32: return func(i interface{}) int64 { return int64(i.(int32)) } @@ -31,19 +31,19 @@ type uintConverter func(interface{}) uint64 func getUIntConverter(data interface{}) uintConverter { switch data.(type) { - case (uint): + case uint: return func(i interface{}) uint64 { return uint64(i.(uint)) } - case (uint8): + case uint8: return func(i interface{}) uint64 { return uint64(i.(uint8)) } - case (uint16): + case uint16: return func(i interface{}) uint64 { return uint64(i.(uint16)) } - case (uint32): + case uint32: return func(i interface{}) uint64 { return uint64(i.(uint32)) } @@ -58,7 +58,7 @@ type floatConverter func(interface{}) float64 func getFloatConverter(data interface{}) floatConverter { switch data.(type) { - case (float32): + case float32: return func(i interface{}) float64 { return float64(i.(float32)) }