Getting started with Go on Windows
•I’m giving this Go-lang thing a whirl, turns out it’s dead easy to set up on Windows.
-
First download and install Git if you don’t have it already - when using Go you’ll user a lot of open source!
-
Next download and install the latest 64-bit Go MSI distributable from https://golang.org/dl. Run that hit next, next, next and let it set up all the defaults.
-
Once that’s done open up the CMD and type
go version
if everything is running you should get something likego version go1.6.2 windows/amd64
back.
Great - now Go is installed!
But we’re not quite done yet - Go developers normally keep all their Go code in a single workspace.
The GOPATH
environment variable specifies the location of this workspace. The workspace should contain 3 folders bin
, pkg
and src
.
-
Set up your workspace, I created my workspace at
C:\Development\Go
-
Create the
GOPATH
variable in your Environment settings: System, Advanced system settings, Environment Variables, New…. Then add the variableGOPATH
with the value of your workspace path.
Now you’ve installed Go and have your workspace set up - you’re practically good to go.
Now what?
Have some fun, get started here: https://golang.org/doc/code.html