Multiple plugin load issue

agolangf · · 526 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Heya! I&#39;ve been playing around with building a Rules Engine in Golang using plugins. The problem I&#39;m seeing is when I load multiple plugins the symbol lookup is always linking to the first plugin loaded. I cannot resolve a symbol to the second plugin.</p> <p>The code is <a href="https://github.com/patrobinson/go-fish" rel="nofollow">here</a> and when I run the tests I can see only the first Rule is started:</p> <pre><code>go-fish $ ./script/run_docker_tests.sh DEBU[0000] Starting A rule DEBU[0000] Starting A rule DEBU[0000] Starting A rule DEBU[0000] Starting A rule PASS ok github.com/patrobinson/go-fish 0.030s </code></pre> <hr/>**评论:**<br/><br/>ChristophBerger: <pre><p>Maybe the problem occurs because both plugins have the same symbols (Rule etc) in the same namespace (package main). (Might be a bug then.)</p> <p>Boiling down the code to a minimal test case (i.e., just enough code to replicate the issue) might help revealing the cause and/or finding a workaround.</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

526 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传