Skip to content

Instantly share code, notes, and snippets.

@michaellihs
Last active June 11, 2017 09:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaellihs/0648fddec0ae2f61bb877732b33679a0 to your computer and use it in GitHub Desktop.
Save michaellihs/0648fddec0ae2f61bb877732b33679a0 to your computer and use it in GitHub Desktop.
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

Testing

CLI Tools

Networkging and HTTP

Tooling

Packages and Frameworks

General

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