Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问导入自定义插件失败应该如何解决? #41

Open
AngieQ1 opened this issue Aug 19, 2019 · 7 comments
Open

请问导入自定义插件失败应该如何解决? #41

AngieQ1 opened this issue Aug 19, 2019 · 7 comments

Comments

@AngieQ1
Copy link

AngieQ1 commented Aug 19, 2019

image
写了个测试插件,但是一直加载不成功,想问下应该如何解决?谢谢!

@ywolf
Copy link
Member

ywolf commented Aug 20, 2019

可以描述一下整个流程吗

@ywolf
Copy link
Member

ywolf commented Aug 20, 2019

是JSON插件么?JSON插件的话得# 打包JSON插件到项目代码中
esc -include='.json$' -o plugin/json/JSONPlugin.go -pkg jsonplugin plugin/json/

@xiaobing88
Copy link

请问:

打包JSON插件到项目代码中

esc -include='.json$' -o plugin/json/JSONPlugin.go -pkg jsonplugin plugin/json/
这个命令是在哪个目录下运行的啊,
'.json$' 这个参数,能具体解释一下吗?还有-pkg jsonplugin plugin/json/

@ywolf
Copy link
Member

ywolf commented Jan 21, 2020

-include= 这个是文件名 筛选的正则

@xiaobing88
Copy link

有个问题,就是,python示例下,extra_plugin_path 参数问题;
程序先加载json插件,后设置config,导致我在debug时,无法获取到path。
执行顺序的问题,困扰很久。

@xiaobing88
Copy link

自定义json插件,
我的临时解决方案是
json目录下的init.go
func init() {
util.Logger.Println(“自定义json plugin路径:↓↓↓↓↓↓↓↓↓↓↓↓↓↓”)
// loadJSONPlugin(false, “/plugin/json/”)
loadJSONPlugin(true, “json_plugin的绝对路径”)
go loadExtraJSONPlugin()
}

@No-sleeping
Copy link

No-sleeping commented Mar 9, 2020

麻烦问下,我这里的json插件一直没有初始化成功。你这里是怎么加载出来json插件的啊。
[info] 17:04:19 log.go:44: [json plugin total: 0]
@xiaobing88

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants