1
0
mirror of https://github.com/rancher/rke.git synced 2025-06-28 00:09:18 +00:00
rke/vendor/github.com/json-iterator/go/feature_json_number.go
2017-11-13 23:23:16 +02:00

16 lines
269 B
Go

package jsoniter
import "encoding/json"
type Number string
func CastJsonNumber(val interface{}) (string, bool) {
switch typedVal := val.(type) {
case json.Number:
return string(typedVal), true
case Number:
return string(typedVal), true
}
return "", false
}