finds.dev← search

// the find

GoesToEleven/golang-web-dev

★ 3,407 · Go · updated Feb 2024

Companion code for a video course on Go web development, laid out as hundreds of numbered lesson folders rather than an application. It suits someone learning net/http and html/template by following along, not someone looking for a library or a starting point for a service.

- The numbering follows a real teaching order: raw TCP servers in 15_tcp-server, then handlers and ServeMux, then html/template with included and nested templates (13_template-must, 14_nested-templates, 27_review-exercise). You can read it top to bottom as a syllabus.

- The testing lessons under 34_test are split into steps you can run one at a time: a basic test, coverage output, a benchmark, an Example function, testing.Short and -v handling, parallel tests, and table-driven tests. Each step is small enough to read in one sitting.

- Most lesson folders are a single self-contained main.go, so go run on one folder works without setting up the rest of the tree.

- It is not an application and was not written to be one. The same idea gets rewritten in several variants (16_svcc/00 to 05, 18_svcc-sat/00 to 04, 10_review-tcp/01 to 07), and nothing is shared across folders, so there is no pattern to copy into a real service.

- The tree mixes in material unrelated to Go web code: a Bootstrap-era business_demo with LESS and minified JS, a gulpfile and package.json for a Node build, a letter.phpasp file, and a 000_temp folder that holds scratch files alongside the lessons.

- Generated output is committed. cover.out appears in 02_coverage, 03_benchmark and 04_example, and those files will drift from the code as soon as anyone edits it.

- The last push was February 2024. Treat it as a frozen snapshot of a course, not a maintained reference, and check any API usage against current Go docs before reusing it.

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 →