1 Star 1 Fork 0

fast_api / api

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
big_type.go 459 Bytes
一键复制 编辑 原始数据 按行查看 历史
t.io 提交于 2022-03-22 08:44 . full err out
package types
import (
"fmt"
"gitee.com/fast_api/api/def"
"math/big"
"reflect"
)
type BigType struct {
}
func (f BigType) Mapper(param def.ParamWarp) reflect.Value {
if in, b := new(big.Int).SetString(param.PValue, 10); b {
return reflect.ValueOf(*in).Convert(param.PTyp)
}
panic(fmt.Sprintf("BigType error param %s", param.PValue))
}
func (f BigType) Register() []reflect.Type {
return []reflect.Type{reflect.TypeOf((*big.Int)(nil)).Elem()}
}
1
https://gitee.com/fast_api/api.git
git@gitee.com:fast_api/api.git
fast_api
api
api
v0.0.5

搜索帮助