The Go Way:
- Go for gophers
- Code is communication. Be articulate. Choose good names. Design simple interfaces. Write precise documentation. Don’t be too clever.
- Less is exponentially more. New features can weaken existing features. Complexity defeats orthogonality. Orthogonality is vital: it enables composition.
- Composition is key. Don’t solve problems by building a thing. Instead, combine simple tools and compose them.
-
Design good interfaces. Don’t over-specify. Don’t under-specify. Find the sweet
spot. - Simplicity is hard. Invest the time to find the simple solution.
Study (in this order):
- The spec: The Go Programming Language Specification - The Go Programming Language
- Tour of Go: A Tour of Go
- How to Write Go Code: How to Write Go Code - The Go Programming Language
- Effective Go: Effective Go - The Go Programming Language
- Go by Example: https://gobyexample.com/
Practice:
Documentation:
- http://godoc.org/
- Docs the Go way: Go for gophers
Style:
- Common Go code review comments: https://code.google.com/p/go-wiki/wiki/CodeReviewComments
Vim and Go:
- The standard Go distribution includes a Go syntax file for Vim in
go/misc/vim/
. Go in Vim - Vundle-friendly autocompletion,
:Format
,:Import
,GoDoc
https://github.com/Blackrush/vim-gocode
Open source projects to be involved in:
- Next-generation Heroku CLI, replacing
heroku
: https://github.com/heroku/hk - Next-generation GitHub CLI, replacing
hub
: GitHub - owenthereal/gh: Fast GitHub command line client (deprecated). gh has been merged into https://github.com/github/hub, see https://github.com/github/hub/issues/475 for more info - Next-generation process manager, replacing
foreman
: https://github.com/ddollar/forego exercism.io CLI, https://github.com/exercism/cli
Writing command line interfaces:
-
os.Args
Go by Example: Command-Line Arguments - The flag package in standard library: flag package - flag - Go Packages
JSON and Go:
- Go by Example: JSON
- JSON and Go - The Go Programming Language
- http://supermar.in/go-for-a-rubyist/
- json package - encoding/json - Go Packages
Deployment:
- Heroku: GitHub - freeformz/go-on-heroku
- Heroku buildpack: GitHub - heroku/heroku-buildpack-go: Heroku Go Buildpack
- Best practices for Go in production: Peter Bourgon · Go: Best Practices for Production Environments
Help:
- Official mailing list: Redirecting to Google Groups
-
#go-nuts
on Freenode