Skip to content

Commit

Permalink
add support for int64 convertion
Browse files Browse the repository at this point in the history
  • Loading branch information
wuxibin89 committed Dec 22, 2015
1 parent 934f863 commit de77939
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions reply.go
Expand Up @@ -412,6 +412,8 @@ func convertAssign(d interface{}, s interface{}) (err error) {
*d = string(s)
case *int:
*d, err = strconv.Atoi(string(s))
case *int64:
*d, err = strconv.ParseInt(string(s), 10, 64)
case *bool:
*d, err = strconv.ParseBool(string(s))
case *[]byte:
Expand All @@ -436,6 +438,8 @@ func convertAssign(d interface{}, s interface{}) (err error) {
x = 0
}
*d = x
case *int64:
*d = s
case *bool:
*d = s != 0
case *interface{}:
Expand Down

0 comments on commit de77939

Please sign in to comment.