/go-learn

Learn Go

MIT LicenseMIT

Learn Go

Sections and links are ordered alphabetically.

See the Tracks section to get started.

Some thoughts that may help you acclimate:

Language

Go has an opinioned design. Whereas some languages enable, and even encourage, more than one way to do things, for Go there is only the Go Way. This is what is meant by Go idioms or being idiomatic Go. Things tend to be simpler and easier if you do them the Go Way.

Go is a relatively new language and does some things differently:

  • Single command-line tool
  • Built-in building, installing, running, testing, benchmarking, profiling, vendoring, code generation, build constraints, and documentation
  • Decentralized package management
  • Clean, quiet, and fast builds
  • Cross compilation
  • Standard code style and formatter
  • Concurrency support and automatic parallelism
  • Composition instead of inheritance
  • Crashing early for programmer errors
  • No assertions
  • Table-driven tests
  • No leveled logging

Go was made to fill a void: writing high-performance server software productively. Go is not suitable for all purposes.

Team

The core group of engineers that contribute to Go are called the Go Team. They are smart, thoughtful, opinionated, and principled. They are also pragmatic and careful. They can be abrasive; try not to take it personally.

They do not add something if they do not know how to do it well, and they are serious about the Go 1 compatibility promise. These explain why Go lacked or lacks some features.

Community

The Gopher is the official Go mascot and community members are called Gophers.

The Go community is large and thriving. A new language means new opportunities for new libraries and tools. There are many open-source packages. There are many companies using Go. There are many places to go for help. There are many conferences and meetups. Sometimes Go Team members attend the San Francisco Go meetup and the Sydney Go meetup. There is a code of conduct for communities moderated by the Go Team.

Articles

Advice:

Blog:

Dave Cheney:

Rob Pike:

Community

Documentation

Web:

Commands:

  • go help build
  • go help buildmode
  • go help c
  • go help clean
  • go help doc
  • go help env
  • go help environment
  • go help filetype
  • go help fmt
  • go help generate
  • go help get
  • go help gopath
  • go help importpath
  • go help install
  • go help list
  • go help packages
  • go help run
  • go help test
  • go help testflag
  • go help testfunc
  • go help version
  • go help vet
  • go help

Introduction

Libraries

Standard:

Third party:

Reference

Talks

Tips

Tools

Tracks

New Mac environment:

  • Install Homebrew: https://brew.sh
  • Install Go: brew install go
  • Configure GOPATH: export GOPATH=~/Developer/go (you can symlink ~/Developer/go if needed)
  • Configure PATH: export PATH=$PATH:~/Developer/go/bin
  • Install goimports: go get golang.org/x/tools/cmd/goimports
  • Install gometalinter: go get github.com/alecthomas/gometalinter && gometalinter --install
  • Configure your editor
  • Useful alias: alias cdd=cd ~/Developer
  • Useful alias: alias cdg=cd ~/Developer/go
  • Useful alias: alias cds=cd ~/Developer/go/src

Sections for little or no experience:

  • Introduction
  • Reference
  • Documentation
  • Libraries
  • Tools
  • Community

Sections for some experience:

  • Articles
  • Tips
  • Videos
  • Talks
  • Wiki

Videos

Wiki