Home
/ Golang Archive
This learning material is in the archive . It is not currently maintained and has not been updated with the latest information, so tool versions, prices and dates may be out of date.
The Language Module 1 5 lessons ~3h 45m
Lessons, in order 1.a
Why Go, and the Toolchain Go is a compiled, statically typed, garbage-collected language built for writing servers and tools. The compiler turns your whole program — and a copy of the Go runtime — into one executable …
30 min
1.b
Values, Types and Zero Values In Go, everything is a value, and assignment copies the value. Passing an argument copies it. Returning it copies it. There are no hidden references.
45 min
1.c
Functions, Errors and Defer Functions are values: they can be stored, passed and returned, and a function literal can capture variables from around it (a closure). Functions can return several values, and by convention …
50 min
1.d
Structs, Methods and Interfaces A struct groups fields. A method is a function attached to a type. An interface is a set of method signatures, and a type satisfies it simply by having those methods — there is no implements …
50 min
1.e
Packages, Modules and Testing A package is a directory of .go files compiled together; it is Go's unit of code and of visibility. A module is a tree of packages with a go.mod file that names it and pins its dependencies; …
50 min
About this module Go is a small language. This module covers all of it that you need daily, quickly, and with one
eye already on what each feature costs.
When you finish you can read almost any Go code and write a tested package of your own.
If you already write Go, skim lesson 02 for the copy rules and move to module 2.