Concise descriptions of core Go concepts
Table of contents
Interfaces in a nutshell
An interface type consists of a set of method signatures. A variable of interface type can hold any value that implements these methods.
Slices and arrays in a nutshell
A slice refers to a section of an underlying array. It can grow and shrink within the bounds of this array.
Maps in a nutshell
A map is an unordered collection of key-value pairs.
5 basic for loop patterns
The for loop can be used for three-component loops, while loops, infinite loops and for-each range loops. You can exit a loop with break or continue.
5 switch statement patterns
A switch-case-default statement is a shorter and cleaner way to write a sequence of if-else statements.
Packages in a nutshell
Every Go program is made up of packages and each package has an import path.
The Concurrent programming tutorial covers the fundamentals of concurrent programming with examples in Go.
Follow on Twitter
One useful golang fact per day
Share this page: