<p>I am doing some tests with vgo and I can't get a local library to work correctly</p>
<p>The application code layout is like so:</p>
<pre><code>$GOPATH/src/app-repo
- bin1
- main.go
- bin2
- main.go
- lib
- foo.go
</code></pre>
<p>Both bin packages are meant to be compiled and use the lib package (via <code>import "app-repo/lib"</code>).</p>
<p>Using the basic instructions for vgo, it (rightfully) complains about bad urls.</p>
<p>Is there a way to "point" vgo to these modules, or a way to make vgo import over a git+ssh connection (literally the only thing I miss from node/npm)?</p>
<p>EDIT: note that the layout above is how the app is currently. For my tests I made a simple mock app outside the <code>$GOPATH</code></p>
<p>EDIT 2: I followed <a href="https://gist.github.com/shurcooL/6927554" rel="nofollow">this</a> to get my dependency over ssh with my ssh key and that works for regular <code>go get</code> but <code>vgo build</code> fails with </p>
<pre><code>vgo: resolving import "my-repo/vgo-test/lib"
vgo: import "testgroup/bin1" ->
import "my-repo/vgo-test/lib": module root is "my-repo/vgo-test"
</code></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传