Golang Setup on Ubuntu

June 16, 2019

Installing Golang on Ubuntu

We will be using snappy tool to install go on ubuntu.

Ref: snappy

GOOS & GOARCH build arguments

Go provides easy to build executable binary for any platform.

For e.g: To build binary for windows

-- builds main.exe
$ env GOOS=windows GOARCH=amd64 go build main.go 
$ ls
main.exe main.go

Go CLI