forked from golang/hotime
This commit is contained in:
parent
f4f4d4b83d
commit
9c730aae4d
@ -129,6 +129,7 @@ func ObjToFloat64(obj interface{}, e ...*Error) float64 {
|
||||
if len(e) != 0 {
|
||||
e[0].SetError(err)
|
||||
}
|
||||
|
||||
return v
|
||||
}
|
||||
|
||||
@ -238,7 +239,7 @@ func ObjToStr(obj interface{}) string {
|
||||
case string:
|
||||
str = obj.(string)
|
||||
case float64:
|
||||
str = strconv.FormatFloat(obj.(float64), 'f', 6, 64)
|
||||
str = strconv.FormatFloat(obj.(float64), 'f', -1, 64)
|
||||
default:
|
||||
strbte, err := json.Marshal(obj)
|
||||
if err == nil {
|
||||
|
Loading…
Reference in New Issue
Block a user