ArdanLabs ∴ 2025
This repo contains the material for the "Practical Go Foundations" class. The code & links are synced with the [online class](for Developers).
This is an assorted collection of exercises for teaching, not a real Go project.
We highly recommend that you set up a local working environment and follow along with the videos. To setup a local environment install the following:
- The Go SDK either from your package manager (
brew
,apt
,choco
...) or from here git
- And IDE such as VSCode with the Go extension or GoLand
However, if you want to jump right in, you can use GitHub codespaces with the course repository. To start a codespaces follow these steps:
- Click on the green "<> Code" button
- Select the "Codespaces" tab
- Click on the green "Create codespace on main" button
After a while you should have a new tab with Visual Studio Code already set up. You can read more about codespaces here.
Miki Tebeka [email protected], @tebeka, mikitebeka, blog, medium.
- Go Essential Training - LinkedIn Learning
- Go Brain Teasers book
- hw.go - Hello World
- banner.go - Working with strings, Unicode
- github.go - Calling REST APIs, JSON
- kill_server.go - Working with files, defer, error handling
- div.go - Handling panics
- sha1.go - Using
io.Reader
andio.Writer
- cart.go - Working with slices
- game.go - Structs, methods & interfaces
- empty.go - The empty interface
- stats.go - Using generics
- freq.go - Processing text, regular expressions
- go_chan.go - Goroutines and channels
- urls.go - Fan out patterns
- taxi_check.go - Convert sequential code to concurrent
- count.go - Using mutex and atomic, the race detector
- select.go - Using select, context for timeout and cancellation
- rtb.go - Using context for timeouts
- nlp -
nlp
project
- GoReleaser - Building Go executables
- HTTP status cats
- errors package (Go 1.13)
- encoding/json
- net/http
- Numbers
- math/big - Big numbers
- Numeric types
- Strings
- Unicode table
- strings package - string utilities
- Go strings
- Plain Text - Great Video on Unicode
- Go Proverbs - Think about them ☺
- Annotated "Hello World"
- Effective Go - Read this!
- Go standard library - official documentation
- A Tour of Go
- Setting Up
- The Go SDK
- git
- IDE's: Visual Studio Code + Go extension or Goland (paid)
- Hyrum's Law
- regex101 - Regular expression builder
- sort examples - Read and try to understand
- When to use generics
- Generics tutorial
- Methods, interfaces & embedded types in Go
- Methods & Interfaces in the Go tour
- Slices
- Slices & Slice internals on the Go blog
- Slice tricks
- Error Handling
- Defer, Panic and Recover
- errors package (Go 1.13)
- pkg/errors
- Composition over inheritance
- The race detector
- Uber Go Style Guide
- errgroup
- Data Race Patterns in Go
- Go Concurrency Patterns: Pipelines and cancellation
- Go Concurrency Patterns: Context
- Curious Channels
- The Behavior of Channels
- Channel Semantics
- Why are there nil channels in Go?
- Amdahl's Law - Limits of concurrency
- Computer Latency at Human Scale
- Concurrency is not Parallelism by Rob Pike
- Scheduling in Go by Bill Kennedy
- The cost of Go's panic and recover
- Conway's Law
- The Twelve-Factor App
- Configuration
- Logging
- Metrics
- Built-in expvar
- Open Telemetry
- Prometheus
- External web servers:
- Go Code Review Comments
- Tutorial: Getting started with multi-module workspaces
- Example Project Structure
- Organizing a Go module
- How to Write Go Code
- Documentation
- Godoc: documenting Go code
- Go Doc Comments
- Testable examples in Go
- Go documentation tricks
- gob/doc.go of the
gob
package. Generates this documentation go install golang.org/x/pkgsite/cmd/pkgsite@latest
(require go 1.18+)pkgsite -http=:8080
(open browser on http://localhost:8080/${module name})
- Out Software Dependency Problem - Good read on dependencies by Russ Cox
- Linters (static analysis)
- staticcheck
- golangci-lint
- gosec - Security oriented
- vulncheck - Check for CVEs
- golang.org/x/tools/go/analysis - Helpers to write analysis tools (see example)
- Testing
- testing
- testify - Many test utilities (including suites & mocking)
- Ginkgo
- Tutorial: Getting started with fuzzing
- testing/quick - Initial fuzzing library
- test containers
- HTTP Servers
- net/http
- net/http/httptest
- chi - A nice web framework
G☺
♡
- http.log.gz
https://api.github.com/users/tebeka
- Slides
- Unicode
- Cost of errors
- sherlock.txt
- slices
- rtb.go
- taxi.tar
- flags - More types for the built-in
flag
package - nlp.go
- stemmer.go
- tokenize_cases.toml
- github.com/BurntSushi/toml