finds.dev← search

// the find

GoesToEleven/learn-to-code-go-version-03

★ 508 · Go · updated Feb 2024

Code for the third version of my "Learn To Code Go" course

The companion code for Todd McLeod's Learn To Code Go video course, with one small main.go per lesson in a numbered directory tree that moves from basics through packages, interfaces, generics, concurrency, testing, and file I/O. It is for someone working through the videos. Read cold, it is mostly snippets that make sense alongside the lectures.

- The numbering reflects a real progression. Interfaces get four assertion examples, generics goes from a bare type parameter through constraints and comparable, and the concurrency block runs channels, waitgroups, errgroup and sync.Once, then mutex, atomic, select, and context.

- The tokenizer package reappears across the testing lessons (plain tests, testify, table-driven tests, example tests, fuzzing), so the same code is shown being tested several different ways.

- Lessons that touch the filesystem ship their inputs. The unzip examples include real zip archives under testdata and the file-replace examples include sample text files, so they run without setup.

- The last push was 2024-02-05, more than two and a half years ago, and nothing visible suggests the examples were revisited. Go 1.22 changed loop variables to per-iteration scope, so any goroutine examples written under the old rules may now teach the wrong lesson without a note saying so.

- Build artifacts and scratch files are committed: several .exe binaries (000-ad-generics-00d, 000-ao-07, 000-ao-08, 000-ap-unzip-04), a .DS_Store, temp.txt, a file named temp, and multiple notes.txt files. It clutters the clone and suggests nothing was tidied.

- The README is a course pitch and a link. It gives no Go version, no run instructions, and no index of the numbered directories, so anyone cloning it has to work out how to run one lesson and which lesson covers what.

- Names drift. 'assetion' and 'assertion' both appear, 'cncrncy' and 'contstant' are typos, and 000-as-slice-o6 uses a letter o where a zero belongs. The numbering is the only index the repo has, and it is inconsistent.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →