Skip to content

Commit

Permalink
Fix for code paths in formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
codepope committed Aug 22, 2018
1 parent db51836 commit 99ac2be
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions redli.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,23 +294,20 @@ func toRedisValueString(value interface{}, forceraw bool) string {
case redis.Error:
if raw || forceraw {
return fmt.Sprintf("%s", v.Error())
} else {
return fmt.Sprintf("(error) %s", v.Error())
}
return fmt.Sprintf("(error) %s", v.Error())
case int64:
if raw || forceraw {
return fmt.Sprintf("%d", v)
} else {
return fmt.Sprintf("(integer) %d", v)
}
return fmt.Sprintf("(integer) %d", v)
case string:
return fmt.Sprintf("%s", v)
case []byte:
if raw || forceraw {
return fmt.Sprintf("%s", string(v))
} else {
return fmt.Sprintf("\"%s\"", string(v))
}
return fmt.Sprintf("\"%s\"", string(v))
case nil:
return "nil"
}
Expand Down

0 comments on commit 99ac2be

Please sign in to comment.