The eighteenth lesson of the Go course and the end of the module on the language. One finished program made of familiar parts: a struct, a slice, a map, methods with a pointer receiver, errors, a package of your own and tests. Nothing new but reading commands from the keyboard: putting what you learned into a working thing is a skill of its own.
The seventeenth lesson of the Go course. GitHub is not a backup but the same history, made visible to other people. An account and a first repository, git remote and git push, why a password is no longer accepted there and what replaced it, the README as the first thing a person reads, and the things that must never be published anywhere public.
The sixteenth lesson of the Go course. Git keeps not the latest version of a file but every state you marked, and any of them can be brought back. git init, the three places — working folder, index and history — git status as the command you will type most, what to write in a message, what .gitignore is for, and how to fetch yesterday's file.
The fifteenth lesson of the Go course. A package is a folder, and a capital letter in a name is the door out of it. How to split a program across folders, what go.mod and go.sum hold, how to bring in someone else's package with go get, what the internal folder is for, and why go mod tidy is run before the code goes anywhere.
The fourteenth lesson of the Go course. An error here does not interrupt the program; it comes back as the second value, and it is the first thing you check. error as an interface with one method, errors.New and fmt.Errorf, wrapping with %w and errors.Is, your own error as a value — and why panic is not for any of this.
The thirteenth lesson of the Go course. An interface is a list of abilities: one function works with any store as long as the store can do what the contract says. Why implementing is never declared but simply happens, how to have it checked at build time, and why a stand-in store is what makes tests possible without a database.
The twelfth lesson of the Go course. The answer to last lesson's trap: a pointer is the address of a value, not a copy of it. How & and * actually work, how a method differs from a plain function, when the receiver takes a pointer and when a value, and why for i := range fixes the very thing that for _, a := range quietly breaks.
The eleventh lesson of the Go course. A struct is a type of your own: type Article struct in place of three maps that had to be kept in step by hand. Fields and the dot, literals with and without field names, the zero struct, a slice of structs, and the trap that matters: a struct is passed as a copy, so a change made inside range disappears.
The tenth lesson of the Go course. A check that stays written down: a _test.go file beside the code, a TestXxx function and the go test command. How to read a failure — the test name, the file, the line, "got" and "wanted" — how t.Errorf differs from t.Fatalf, and why you test the edges of a list rather than its middle.
A preface to the Go course. What you actually need — a computer, the right to install software and half an hour a day — and what you do not: English, mathematics or a powerful machine. Which terminal you are in and why that matters, what to do when installing software is forbidden, how much of it is free, and what the last step actually costs.