Skip to content

Commit

Permalink
add cases for StringIndent() output
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles Banning committed Dec 3, 2015
1 parent 3bd35ab commit f5918d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mxj.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ func writeMap(m interface{}, offset ...int) string {
return "[nil] nil"
case string:
return "[string] " + m.(string)
case float64:
case int, int32, int64:
return "[int] " + strconv.Itoa(m.(int))
case float64, float32:
return "[float64] " + strconv.FormatFloat(m.(float64), 'e', 2, 64)
case bool:
return "[bool] " + strconv.FormatBool(m.(bool))
Expand Down

0 comments on commit f5918d4

Please sign in to comment.