$ ▍
Instructor: Daniel academybeginnerGo
This course is for people who are starting Go, whether it is their first language or their first compiled one. Nothing is assumed except that you can read English and are willing to be told when you are wrong, because a compiler will be telling you that constantly, and learning to read what it says is half of learning Go. Five modules, twenty-eight lessons, thirteen of them graded in the browser. You start with a program that prints and reads, and the rules Go enforces before it will even build: every variable used, every import used, formatting that is not up for debate. Then types, where Go refuses to guess: an int and a float64 do not mix until you say so, and a string is bytes even when it looks like letters. Module 2 is the one that decides whether Go clicks. An array is a value and copies; a slice is a view onto an array and does not; a map is nil until you make it; a method on a value receiver mutates a copy and quietly changes nothing. Every bug that makes a newcomer say Go is weird lives in that paragraph, so it gets three lessons and three exercises instead of a warning box. Then functions that return their errors instead of throwing them, which is the habit the rest of the language is built around. You wrap an error with %w, unwrap it with errors.Is and errors.As, and meet interfaces right after, because error is one and by then it will read as ordinary. Interfaces here are small and implicit: no implements keyword, no hierarchy, just a type that happens to have the methods. The last module is what most people came for. Goroutines and channels, WaitGroup, select, buffered and unbuffered, and the deadlock treated as a normal thing to read and fix rather than a disaster. You finish by building a pipeline where stages talk over channels and close them properly, which is the shape of a surprising amount of real Go. Now the honest part. The trainer compiles your code with Go 1.26.5 in a sandbox with no network and no modules: one file, main.go, and the standard library. Nothing here can be solved by adding a dependency, which at this level is the point. Three things that sandbox cannot do are taught as things you run on your own machine, with the exact commands, rather than simulated: the race detector, go test, and splitting a program across files. The Go you learn here is the Go people write now, which matters more than it sounds. Loops count with range over an integer. The loop variable is per-iteration, so the old advice to always pass it into the goroutine is explained and then retired. Sorting is the slices package. If you have read older tutorials, the course tells you which of their warnings expired and when. The course is free and it is the entry point of the Go track.
5 modules · 28 lessons
A fragment of the course's final project. Every graduate writes this code with their own hands.
func squares(in <-chan int) <-chan int {
out := make(chan int)
go func() {
defer close(out)
for n := range in {
out <- n * n
}
}()
return out
}
for v := range squares(source) {
fmt.Println(v)
}