USB Portable Compiler

584 views
Skip to first unread message

xtia...@gmail.com

unread,
Feb 25, 2015, 8:16:01 AM2/25/15
to golan...@googlegroups.com
I searched the forum but was unable to locate an answer to my question.  Perhaps this was due to me not typing the correct terms and for which I apologize.

Question:  Is there a way to create a portable (i.e. in a USB) Golang development environment? If possible, I would like to create a USB Golang development environment so I can write some code and compile it while away from home. The goal is to continue learning Go and eventually create some GUI apps.  Thanks in advance.

Geoffrey Teale

unread,
Feb 25, 2015, 8:18:38 AM2/25/15
to xtia...@gmail.com, golang-nuts
Hi,

The simplest way I can think of is to run Ubuntu on a USB stick and install your go development tools there.

This is a well supported use case for Ubuntu already.

-- 
Geoff Teale

On 25 February 2015 at 06:46, <xtia...@gmail.com> wrote:
I searched the forum but was unable to locate an answer to my question.  Perhaps this was due to me not typing the correct terms and for which I apologize.

Question:  Is there a way to create a portable (i.e. in a USB) Golang development environment? If possible, I would like to create a USB Golang development environment so I can write some code and compile it while away from home. The goal is to continue learning Go and eventually create some GUI apps.  Thanks in advance.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Daniel Theophanes

unread,
Feb 25, 2015, 11:46:28 AM2/25/15
to golan...@googlegroups.com, xtia...@gmail.com
You can create a portable go development environment.  To do so, copy the go tool chain onto the USB stick. then create a bash or batch script (depending on your OS) that setup the following environment variables: GOPATH, GOROOT, and includes the go command in the PATH. (Normally you SHOULDN'T set GOROOT, but this would be the exception to the rule).

-Daniel

Joseph Spurrier

unread,
Feb 25, 2015, 4:32:06 PM2/25/15
to golan...@googlegroups.com, xtia...@gmail.com
If you are using Windows, take a look at how I wrote the batch scripts for my portable Windows dev environment: https://github.com/josephspurrier/golang-portable-windows
Reply all
Reply to author
Forward
0 new messages