Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Go CheatSheet

Go Setup

PATH and Env Vars

Within your .profile

 export PATH=$PATH:/usr/local/go/bin      # add go binaries to PATH
 export GOPATH=~/Workspace/go             # set root of all your go projects
 export GOBIN=$GOPATH/bin                 # add binaries compiled from your projects

    export PATH=$PATH:$GOBIN                 # add your own binaries to PATH

$GOROOT defaults to /usr/local/go - if that's not the case (i.e. you installed go to some different location), set the $GOROOT directory as well.

Go Resources

Syntax and Control Structs


CLI Tools

Networkging and HTTP


Packages and Frameworks


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment