4 Star 22 Fork 9

aochulai / GoMiniblink

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
MBModel.go 555 Bytes
一键复制 编辑 原始数据 按行查看 历史
zhongqitao 提交于 2020-11-26 15:56 . 包优化
package GoMiniblink
type JsFunc func(param ...interface{}) interface{}
type GoFnContext struct {
Miniblink Miniblink
Name string
State interface{}
Param []interface{}
}
type GoFn func(context GoFnContext) interface{}
type JsFnBinding struct {
Name string
Fn GoFn
State interface{}
core wkeJsNativeFunction
}
func (_this *JsFnBinding) Call(mb Miniblink, param []interface{}) interface{} {
ctx := GoFnContext{
Miniblink: mb,
Name: _this.Name,
State: _this.State,
Param: param,
}
return _this.Fn(ctx)
}
Go
1
https://gitee.com/aochulai/GoMiniblink.git
git@gitee.com:aochulai/GoMiniblink.git
aochulai
GoMiniblink
GoMiniblink
master

搜索帮助