Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 1.54 KB

go.md

File metadata and controls

38 lines (26 loc) · 1.54 KB

Tools (Go)

Download and install the Go distribution to run your code.

Make sure you $GOPATH environment variable is set, this is required for first time usage. You can use a /go/ folder under your user folder in case OSX and Linux OS:

// MacOS & Linux
export GOPATH=$HOME/go

In case of Windows, we recommend setting up the GOPATH into a simple location like C:\GOPROJECTS:

// Windows
set GOPATH=C:\GOPROJECTS

Now we need an IDE to write the code. There are many options, this tutorial will use Visual Studio Code.

For this tutorial, use all default install options.

Next, install Go for Visual Code package which once installed gives support to GoLang. - Go to Visual Code extension manager (left side, bottom icon) - Type go and select Go plugin made by lukehoben.

!> If during or after installation, you get notifications to install other go related packages, you can safely install them, as these are helper tools that will imporve your Go coding experience in Visual Studio Code.
For example:
-github.com/nsf/gocode - will add context-sensitive autocompletion;
-github.com/rogpeppe/godef - will help you find symbol information in Go source;
-github.com/sqs/goreturns - will autocomplete function returns values for you;
-github.com/tpng/gopkgs - will help you keep track of installed packages;

Next: Authentication