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