Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove redundant parentheses #102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand All @@ -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))
}
Expand All @@ -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))
}
Expand Down