<p>Hello! Could anyone share best practice for subj. I have 2 PC. One for internet and one for dev. </p>
<p>Internet PC has no admin rights so no installation. Only portable. </p>
<p>Dev PC has no Internet connection. But has admin rights. So install Go env, gogland and so - is not problem.</p>
<p>Problem is - any dependancy is a bunch of complecated stuff.
May be someone has expirience in this and could help me.
E. X. For python I just use "pip download" and it brings me all dependencies</p>
<hr/>**评论:**<br/><br/>intermernet: <pre><p>How do you transfer files from the internet PC to the dev PC at the moment? Are they local network connected or do you use USB drives etc?</p>
<p>If you're running "pip download" for python I don't see why you can't run "go get" for Go but I may be missing something in your setup.</p>
<p>If you can get Go running at all on the internet PC (you can just download the zip file from <a href="https://storage.googleapis.com/golang/go1.8.3.windows-amd64.zip" rel="nofollow">https://storage.googleapis.com/golang/go1.8.3.windows-amd64.zip</a> and set the GOPATH variable manually) then you should be able to just copy the entire GOPATH from one PC to the other.</p>
<p>You shouldn't really need admin rights at all to develop in Go so you may be able to do everything on your internet PC without manually syncing files to the dev PC.</p></pre>struck-off: <pre><blockquote>
<p>How do you transfer files from the internet PC to the dev PC at the moment</p>
</blockquote>
<p>I have folder-shares over my PCs. I cannot use USB and its not one network, but has sort of internal mechanism for antivirus check etc. I gess I should try protable go. Does it download packages with all deps ? (I gess so but should ask)</p></pre>Sythe2o0: <pre><p>"Go get" is the equivalent to "pip download" here. Have you tried running it? It's surprising that you'd be able to use pip that way without an internet connection.</p></pre>struck-off: <pre><p>I use pip in internet-PC. It has portable version. </p></pre>jussij: <pre><p>So why not install Go on to that internet-PC?</p>
<p>Go can be copy installed, which means it is portable.</p></pre>intermernet: <pre><p>If you currently have folder shares then you may want to look at a portable proxy server on the internet PC and then set the system proxy on the dev PC to point to that. I haven't had to face this issue in many years, but there should be a few portable proxy apps that you can run on non-privileged ports that will allow you to share the network connection from the internet PC to the dev PC.</p>
<p>If you just use the ZIP file and set GOPATH manually on the internet PC you should be able to just do dev normally on the internet PC.</p>
<p>If you can share the GOPATH folder between the 2 PCs then you can do all "go get" commands on the internet PC and then develop on the dev PC.</p>
<blockquote>
<p>Does it download packages with all deps ?</p>
</blockquote>
<p>Go only comes with the standard library. If you want 3rd party packages you will need to "go get" them.</p></pre>struck-off: <pre><p>I canmot use proxy or what evar coz its no direct access there. So only files. </p></pre>intermernet: <pre><p>Your best bet is to just download and unzip the ZIP version of Go onto the internet PC and set the GOPATH variable. This is effectively a "portable" version of Go. You can then do all dev on the internet PC.</p>
<p>You basically unzip the file somewhere and then modify your local "PATH" variable to include the "bin" directory that you just unzipped. This will allow you to run the "go" command from your command prompt (cmd.exe or powershell.exe).</p>
<p>You then need to setup the GOPATH. Create a folder that you want to develop your code under (can be anything) and then set a GOPATH environment variable pointing to this folder.</p>
<p>You should then be able to use "go get" etc without problems.</p></pre>jussij: <pre><p>There is an official MSI installer: <a href="https://golang.org/dl/" rel="nofollow">https://golang.org/dl/</a></p></pre>struck-off: <pre><p>As I said. I already have pure go envitonment on dev machine. But get external libs is stikl painful </p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传