CodeBlanks Logo Icon CodeBlanks
Free 4 levels

Go

Build efficient microservices with Go's clean syntax and powerful concurrency model. Goroutine, channel, interface and the standard library.

The Go course covers all levels with goroutine, channel, interface, error handling, net/http, encoding/json and reflection. You also learn Docker, gRPC and profiling for production.

  • 272 lessons
  • 19 h 44 min
  • 4 projects

No account needed, you can start right away. To save your progress, create a free account

Levels

The Go course goes from zero to expert in four levels. Start at any level you like.
Not sure of your level? Take the placement test
Beginner

Learn Go fundamentals: variables, data types, functions, control flow, array/slice, map, string, pointer, struct, method, interface and error handling.

  • Go basics
  • Modules
  • Variables
  • Data types
90 lessons · 6 h 32 min See lessons →
Intermediate

Concurrency and the standard library: goroutine, channel, select, sync, context, io, test, benchmark, fmt, encoding/json, net/http and flag.

  • Goroutines
  • Channels
  • Select
  • sync package
80 lessons · 5 h 44 min See lessons →
Advanced

Reflection, unsafe, cgo, plugin, database/sql, middleware, gRPC, Docker, profiling and observability for production-grade services.

  • Reflection
  • unsafe
  • cgo
  • plugin
68 lessons · 4 h 56 min See lessons →
Expert

Go internals: scheduler, GC, compiler, runtime, WASM, embedded and performance tuning.

  • Scheduler
  • Garbage collector
  • Compiler
  • Runtime
34 lessons · 2 h 32 min See lessons →

Projects you will build

At every level you combine what you learned into a real page.

How does it work?

Short explanation

Each lesson explains one concept in a few short cards; no long videos or walls of text.

Try it right away

Multiple choice, fill-in-the-blank and matching exercises lock in what you just learned.

Write it yourself

You write real code in the in-browser editor; it is checked instantly and you see the result live.

Curriculum

48 groups · 272 lessons · 19 h 44 min

Learn Go fundamentals: variables, data types, functions, control flow, array/slice, map, string, pointer, struct, method, interface and error handling.

1
Go basics
6 lessons · 24 min
  1. 1 What is Go? Learn that Go is a simple and fast language born at Google. 4 min
  2. 2 Installing Go Learn to download and install Go and the GOPATH. 4 min
  3. 3 Your first program Write your first Go program with package main and fmt.Println. 4 min
  4. 4 go run and go build Learn to run with go run and compile with go build. 4 min
  5. 5 Comments and semicolons Learn // and /* */ comments and the semicolon rule in Go. 4 min
  6. 6 Summary - Go basics Combine package, fmt and comments to write your first Go program. 4 min
2
Modules
6 lessons · 24 min
  1. 1 go mod init Learn to start a new Go module and the go.mod file. 4 min
  2. 2 package and import Learn the package declaration and adding packages with import. 4 min
  3. 3 The main package Learn that the main package is the program entry point. 4 min
  4. 4 Multiple files Learn that a package can span multiple .go files. 4 min
  5. 5 go.sum and dependencies Learn to add dependencies with go get and the go.sum file. 4 min
  6. 6 Summary - Modules Combine module, package and import to set up a project. 4 min
3
Variables
6 lessons · 24 min
  1. 1 Declaration with var Learn to declare variables with the var keyword. 4 min
  2. 2 Short declaration := Learn short variable declaration with :=. 4 min
  3. 3 const and iota Learn const for constants and iota for auto-increment. 4 min
  4. 4 Zero value Learn that every type in Go has a zero value. 4 min
  5. 5 Type inference Learn how Go infers the type from the right side. 4 min
  6. 6 Summary - Variables Combine var, :=, const and zero value to write a profile. 4 min
4
Data types
6 lessons · 24 min
  1. 1 int and float Learn integer and floating-point types. 4 min
  2. 2 bool and string Learn boolean and text types. 4 min
  3. 3 byte and rune Learn byte and rune types and character representation. 4 min
  4. 4 Type conversion Learn explicit type conversion in Go. 4 min
  5. 5 Type definitions Learn to define new types with the type keyword. 4 min
  6. 6 Summary - Data types Combine int, float, string and bool to write a profile card. 4 min
5
Project: CalculatorProject
4 lessons · 24 min
  1. 1 Project design Design the calculator skeleton and menu structure. 6 min
  2. 2 Add and subtract Write the add and subtract functions. 6 min
  3. 3 Multiply and divide Add multiply, divide and zero check. 6 min
  4. 4 Command-line menu Add a menu with switch and a loop. 6 min
6
Functions
6 lessons · 24 min
  1. 1 func declaration Learn to declare functions with the func keyword. 4 min
  2. 2 Parameters and return Learn to write functions with parameters and return values. 4 min
  3. 3 Multiple return Learn Go's multiple return and named return features. 4 min
  4. 4 Variadic functions Learn to take a variable number of arguments with the ... operator. 4 min
  5. 5 Anonymous functions Learn anonymous functions and the closure concept. 4 min
  6. 6 Summary - Functions Use multiple return and variadic parameters to write a helper. 4 min
7
Control flow
6 lessons · 24 min
  1. 1 if, else if, else Learn conditional branching with if, else if and else in Go. 4 min
  2. 2 for loop Learn for, Go's only loop construct. 4 min
  3. 3 Iterating with range Learn to loop over slices and maps with range. 4 min
  4. 4 switch and fallthrough Learn multi-branch switch and the fallthrough behavior. 4 min
  5. 5 break and continue Learn break and continue to exit or skip loop iterations. 4 min
  6. 6 Summary - Control flow Combine if, for and switch to write a score calculator. 4 min
8
Array and slice
6 lessons · 24 min
  1. 1 Array declaration Learn to declare fixed-size arrays. 4 min
  2. 2 Slice declaration Learn to declare dynamic arrays with slices. 4 min
  3. 3 Appending with append Learn to add elements to a slice with the append function. 4 min
  4. 4 Sub-slice Learn the slice slicing syntax. 4 min
  5. 5 len and cap Learn the length and capacity of a slice. 4 min
  6. 6 Summary - Array and slice Combine slice and append to write a task list. 4 min
9
Project: Shopping cartProject
4 lessons · 24 min
  1. 1 Product struct Define a struct representing a product. 6 min
  2. 2 Adding to cart Add products to the cart with append. 6 min
  3. 3 Computing total Compute the cart total with range. 6 min
  4. 4 Printing the cart Format and print the cart with fmt.Printf. 6 min
10
Map
6 lessons · 24 min
  1. 1 Map declaration Learn to declare a key-value map with make. 4 min
  2. 2 Adding elements Learn to add elements to a map by key. 4 min
  3. 3 Looking up in a map Learn to get a value by key and check existence. 4 min
  4. 4 Deleting from a map Learn to delete elements from a map with the delete function. 4 min
  5. 5 Iterating a map with range Learn to loop over a map with range. 4 min
  6. 6 Summary - Map Combine map concepts to write a dictionary. 4 min
11
String
6 lessons · 24 min
  1. 1 String and byte Learn the byte slice behind a string. 4 min
  2. 2 String concatenation Learn string concatenation with + and fmt.Sprintf. 4 min
  3. 3 Conversion with strconv Learn string-number conversions with strconv. 4 min
  4. 4 The strings package Learn common functions of the strings package. 4 min
  5. 5 Rune and UTF-8 Learn Unicode characters with rune and UTF-8 encoding. 4 min
  6. 6 Summary - String Combine strconv and strings to write a text processor. 4 min
12
Pointer
6 lessons · 24 min
  1. 1 What is a pointer? Learn that a pointer is a memory address. 4 min
  2. 2 & and * operators Learn the address (&) and dereference (*) operators. 4 min
  3. 3 The new function Learn to allocate memory returning a pointer with new. 4 min
  4. 4 Pointers and functions Learn to pass pointers to functions and modify values. 4 min
  5. 5 Nil pointer Learn the nil pointer concept and safe usage. 4 min
  6. 6 Summary - Pointer Write a counter increment function with & and *. 4 min
13
Struct
6 lessons · 24 min
  1. 1 Struct declaration Learn to define a struct with type. 4 min
  2. 2 Creating a struct Learn to create struct values and assign fields. 4 min
  3. 3 Field access Learn to access struct fields with the dot operator. 4 min
  4. 4 Struct embedding Learn to embed one struct inside another. 4 min
  5. 5 Struct and pointer Learn struct pointers and dot access. 4 min
  6. 6 Summary - Struct Combine struct, embedding and pointer to write a person record. 4 min
14
Methods
6 lessons · 24 min
  1. 1 Method declaration Learn to declare methods on structs. 4 min
  2. 2 Pointer receiver Learn to mutate a struct from a method with a pointer receiver. 4 min
  3. 3 Value receiver Learn read-only methods with a value receiver. 4 min
  4. 4 Methods and embedding Learn how embedded struct methods are promoted. 4 min
  5. 5 Method chaining Learn to return the receiver for method chaining. 4 min
  6. 6 Summary - Methods Combine value and pointer receivers to write a bank account. 4 min
15
Interface and error
6 lessons · 24 min
  1. 1 Interface declaration Learn to declare an interface with type ... interface. 4 min
  2. 2 Implicit satisfaction Learn that Go interfaces are satisfied implicitly. 4 min
  3. 3 The error interface Learn the error interface and the Error() method. 4 min
  4. 4 Returning errors Learn to return errors with errors.New and fmt.Errorf. 4 min
  5. 5 errors.Is and errors.As Learn error wrapping and errors.Is, errors.As usage. 4 min
  6. 6 Summary - Interface and error Combine interface and error to write a validator. 4 min
16
Beginner finalFinal
4 lessons · 32 min
  1. 1 Challenge 1 - Combined program Write a program combining variables, loops and functions. 8 min
  2. 2 Challenge 2 - Data structure Write a contacts app with struct and slice. 8 min
  3. 3 Challenge 3 - Error handling Write a function returning an error and calling code. 8 min
  4. 4 Challenge 4 - Mini app Write an inventory with map, struct and function. 8 min

Concurrency and the standard library: goroutine, channel, select, sync, context, io, test, benchmark, fmt, encoding/json, net/http and flag.

1
Goroutines
6 lessons · 24 min
  1. 1 What is a goroutine? Learn that a goroutine is a lightweight thread. 4 min
  2. 2 The go keyword Learn to run a function in the background with the go keyword. 4 min
  3. 3 Goroutine and function Learn to call a function as a goroutine. 4 min
  4. 4 The main goroutine Learn that the main function itself is a goroutine. 4 min
  5. 5 Number of goroutines Learn to launch many goroutines and concurrency. 4 min
  6. 6 Summary - Goroutines Combine goroutines to write a parallel task. 4 min
2
Channels
6 lessons · 24 min
  1. 1 What is a channel? Learn that a channel is a communication tool between goroutines. 4 min
  2. 2 Channel with make Learn to create a channel with make. 4 min
  3. 3 Sending data Learn to send data to a channel with the <- operator. 4 min
  4. 4 Receiving data Learn to receive data from a channel with <-. 4 min
  5. 5 Buffered channel Learn buffered channels and the capacity concept. 4 min
  6. 6 Summary - Channels Combine channel concepts to write a worker. 4 min
3
Select
6 lessons · 24 min
  1. 1 What is select? Learn to wait on multiple channels with select. 4 min
  2. 2 Multiple channels Learn multiple cases inside select. 4 min
  3. 3 default and non-blocking Learn non-blocking send and receive with default. 4 min
  4. 4 Select with timeout Learn to use time.After for a timeout inside select. 4 min
  5. 5 Closing a channel Learn to close a channel with close and detect closure. 4 min
  6. 6 Summary - Select Combine select, timeout and close to write a scheduler. 4 min
4
sync package
6 lessons · 24 min
  1. 1 sync.Mutex Learn to synchronize access to shared data with a Mutex. 4 min
  2. 2 sync.RWMutex Learn the read-write mutex and RLock/RUnlock. 4 min
  3. 3 sync.WaitGroup Learn to wait for goroutines with a WaitGroup. 4 min
  4. 4 sync.Once Learn to run code exactly once with Once. 4 min
  5. 5 sync.Pool Learn object reuse with Pool. 4 min
  6. 6 Summary - sync package Combine Mutex and WaitGroup to write a parallel counter. 4 min
5
Project: ConcurrencyProject
4 lessons · 24 min
  1. 1 Worker pool skeleton Design the worker pool structure and channels. 6 min
  2. 2 Job queue Distribute jobs to workers over a channel. 6 min
  3. 3 Collecting results Collect results from a separate channel. 6 min
  4. 4 Error handling Add error handling in workers and a WaitGroup. 6 min
6
Context
6 lessons · 24 min
  1. 1 context.Background Learn the context package basics and Background. 4 min
  2. 2 WithCancel Learn cancellable context with WithCancel. 4 min
  3. 3 WithTimeout Learn time-bounded context with WithTimeout. 4 min
  4. 4 WithValue Learn to carry values inside a context with WithValue. 4 min
  5. 5 WithDeadline Learn context bound to a specific time with WithDeadline. 4 min
  6. 6 Summary - Context Combine context types to write a cancellable request. 4 min
7
io package
6 lessons · 24 min
  1. 1 io.Reader Learn the Reader interface and the Read method. 4 min
  2. 2 io.Writer Learn the Writer interface and the Write method. 4 min
  3. 3 os.Stdin and os.Stdout Learn the standard input and output streams. 4 min
  4. 4 bufio.Scanner Learn to read lines with bufio.Scanner. 4 min
  5. 5 io.Copy Learn to transfer data with io.Copy. 4 min
  6. 6 Summary - io package Combine Reader and Writer to write a file copier. 4 min
8
Testing
6 lessons · 24 min
  1. 1 Test function Learn the func TestXxx signature and the go test command. 4 min
  2. 2 t.Error and t.Fatal Learn t.Error and t.Fatal to report failures. 4 min
  3. 3 Table-driven tests Learn the table-driven test pattern. 4 min
  4. 4 Test helpers Learn helpers like t.Helper and t.Cleanup. 4 min
  5. 5 Example tests Learn Example functions and output verification. 4 min
  6. 6 Summary - Testing Combine table tests and helpers to write a math test. 4 min
9
Benchmark
6 lessons · 24 min
  1. 1 Benchmark function Learn the func BenchmarkXxx signature and go test -bench. 4 min
  2. 2 b.ResetTimer Learn b.ResetTimer to exclude setup time. 4 min
  3. 3 Memory benchmark Learn to measure memory usage with b.ReportAllocs. 4 min
  4. 4 Sub-benchmark Learn to run sub-benchmarks with b.Run. 4 min
  5. 5 Comparing benchmarks Learn to compare benchmark results with benchstat. 4 min
  6. 6 Summary - Benchmark Write a slice benchmark with b.Run and b.ReportAllocs. 4 min
10
fmt package
6 lessons · 24 min
  1. 1 fmt.Printf Learn Printf and format verbs. 4 min
  2. 2 Format verbs Learn common verbs like %v, %d and %s. 4 min
  3. 3 fmt.Sprintf Learn to return a formatted string with Sprintf. 4 min
  4. 4 fmt.Errorf Learn to create formatted errors with Errorf. 4 min
  5. 5 fmt.Fprintln Learn to write to a Writer with Fprintln. 4 min
  6. 6 Summary - fmt package Combine Printf, Sprintf and Errorf to write a reporter. 4 min
11
encoding/json
6 lessons · 24 min
  1. 1 The encoding/json package Learn the basics of the encoding/json package. 4 min
  2. 2 Struct tags Learn to control field names with json:"..." tags. 4 min
  3. 3 Marshal and Unmarshal Learn to produce JSON with Marshal and parse with Unmarshal. 4 min
  4. 4 Encoder and Decoder Learn json.NewEncoder and json.NewDecoder. 4 min
  5. 5 JSON and map Learn map[string]interface{} for dynamic JSON. 4 min
  6. 6 Summary - encoding/json Combine Marshal, Unmarshal and tags to write a record. 4 min
12
net/http
6 lessons · 24 min
  1. 1 Client with net/http Learn to make HTTP requests with http.Client. 4 min
  2. 2 http.Get Learn to make a simple GET request with http.Get. 4 min
  3. 3 http.Handler Learn the Handler interface and ServeHTTP. 4 min
  4. 4 http.HandleFunc Learn to map a path with HandleFunc. 4 min
  5. 5 JSON API Learn to write an HTTP endpoint returning JSON. 4 min
  6. 6 Summary - net/http Combine HandleFunc and JSON to write an API. 4 min
13
flag package
6 lessons · 24 min
  1. 1 The flag package Learn the basics of the flag package. 4 min
  2. 2 flag.String and flag.Int Learn to define flags with a type. 4 min
  3. 3 flag.Parse Learn to parse the command line with Parse. 4 min
  4. 4 Subcommand Learn to build your own subcommand structure. 4 min
  5. 5 os.Args Learn to access arguments directly with os.Args. 4 min
  6. 6 Summary - flag package Combine flag and os.Args to write a CLI tool. 4 min
14
Intermediate finalFinal
4 lessons · 32 min
  1. 1 Challenge 1 - Concurrency Write a program combining goroutines, channels and WaitGroup. 8 min
  2. 2 Challenge 2 - HTTP service Write a JSON-returning service with net/http. 8 min
  3. 3 Challenge 3 - Test and benchmark Write a test and benchmark for a function. 8 min
  4. 4 Challenge 4 - CLI tool Write a CLI tool that processes files with flag. 8 min

Reflection, unsafe, cgo, plugin, database/sql, middleware, gRPC, Docker, profiling and observability for production-grade services.

1
Reflection
6 lessons · 24 min
  1. 1 The reflect package Learn the basics of the reflect package. 4 min
  2. 2 reflect.Type Learn to get type info with Type. 4 min
  3. 3 reflect.Value Learn the runtime value with Value. 4 min
  4. 4 Reflecting struct fields Learn to access struct fields with reflect. 4 min
  5. 5 Dynamic call Learn to dynamically call functions and methods with reflect. 4 min
  6. 6 Summary - Reflection Combine reflect.Type and Value to write a struct printer. 4 min
2
unsafe
6 lessons · 24 min
  1. 1 The unsafe package Learn the risks and usage of the unsafe package. 4 min
  2. 2 unsafe.Pointer Learn the universal pointer with unsafe.Pointer. 4 min
  3. 3 Sizeof and Alignof Learn memory layout with Sizeof and Alignof. 4 min
  4. 4 Offsetof Learn struct field offset with Offsetof. 4 min
  5. 5 unsafe and slice Learn the array behind a slice with unsafe. 4 min
  6. 6 Summary - unsafe Combine unsafe.Pointer and Sizeof to write a memory inspector. 4 min
3
cgo
6 lessons · 24 min
  1. 1 What is cgo? Learn the ability to call C code with cgo. 4 min
  2. 2 Calling C code Learn to call C functions with the import "C" block. 4 min
  3. 3 C data types Learn types like C.int and C.char. 4 min
  4. 4 Go-C conversion Learn conversion between Go string and C.CString. 4 min
  5. 5 cgo and memory Learn to free memory allocated with C.CString. 4 min
  6. 6 Summary - cgo Combine cgo to call a C math function. 4 min
4
plugin
6 lessons · 24 min
  1. 1 The plugin package Learn the basics and limits of the plugin package. 4 min
  2. 2 Building a plugin Learn to build a plugin with go build -buildmode=plugin. 4 min
  3. 3 Loading a plugin Learn to load a plugin with plugin.Open. 4 min
  4. 4 Plugin symbol Learn to get an exported symbol with Lookup. 4 min
  5. 5 Plugin and error Learn to handle plugin loading errors. 4 min
  6. 6 Summary - plugin Combine the plugin structure to write a plugin system. 4 min
5
database/sql
6 lessons · 24 min
  1. 1 The database/sql package Learn the basics of the database/sql package. 4 min
  2. 2 sql.Open Learn to open a database connection with sql.Open. 4 min
  3. 3 Query and Exec Learn to read rows with Query and modify with Exec. 4 min
  4. 4 Prepared statement Learn to write safe queries with Prepare. 4 min
  5. 5 Transaction Learn transactions with Begin, Commit and Rollback. 4 min
  6. 6 Summary - database/sql Combine Query and Transaction to write a user record. 4 min
6
Middleware
6 lessons · 24 min
  1. 1 The middleware concept Learn the middleware concept and layered structure. 4 min
  2. 2 HTTP middleware Learn the func(http.Handler) http.Handler pattern. 4 min
  3. 3 Middleware chain Learn to chain multiple middlewares. 4 min
  4. 4 Logging middleware Learn to write a middleware that logs requests. 4 min
  5. 5 Auth middleware Learn to write an auth middleware that validates tokens. 4 min
  6. 6 Summary - Middleware Combine logging and auth middlewares. 4 min
7
gRPC
6 lessons · 24 min
  1. 1 What is gRPC? Learn the main advantages of gRPC and protobuf. 4 min
  2. 2 Protobuf definition Learn to define messages with a .proto file. 4 min
  3. 3 Compiling with protoc Learn to generate Go code with protoc. 4 min
  4. 4 gRPC server Learn to set up a gRPC server and register a service. 4 min
  5. 5 gRPC client Learn to call a remote method with a gRPC client. 4 min
  6. 6 Summary - gRPC Combine server and client to write a gRPC service. 4 min
8
Project: MicroserviceProject
4 lessons · 24 min
  1. 1 Service skeleton Design the microservice skeleton and layers. 6 min
  2. 2 Database layer Write the data access layer with database/sql. 6 min
  3. 3 HTTP API Write REST endpoints with net/http. 6 min
  4. 4 Docker and deployment Add a Dockerfile and multi-stage build. 6 min
9
Docker
6 lessons · 24 min
  1. 1 Dockerfile Learn to write a Dockerfile for a Go app. 4 min
  2. 2 Multi-stage build Learn to produce small images with multi-stage build. 4 min
  3. 3 scratch image Learn the minimal scratch-based image. 4 min
  4. 4 docker-compose Learn multi-service with docker-compose. 4 min
  5. 5 Build args and labels Learn to customize the image with ARG and LABEL. 4 min
  6. 6 Summary - Docker Combine multi-stage and scratch to write a minimal image. 4 min
10
pprof
6 lessons · 24 min
  1. 1 What is pprof? Learn the basics of the pprof profiling tool. 4 min
  2. 2 CPU profiling Learn to create and inspect a CPU profile. 4 min
  3. 3 Memory profiling Learn memory profile and the alloc distinction. 4 min
  4. 4 go test -cpuprofile Learn to profile during tests. 4 min
  5. 5 The trace tool Learn the timeline with go tool trace. 4 min
  6. 6 Summary - pprof Combine CPU and memory profiles to write an analysis. 4 min
11
Observability
6 lessons · 24 min
  1. 1 log/slog Learn structured logging with log/slog. 4 min
  2. 2 Metrics Learn the Prometheus-style metric concept. 4 min
  3. 3 Tracing Learn the distributed tracing concept. 4 min
  4. 4 OpenTelemetry Learn the basics of the OpenTelemetry SDK in Go. 4 min
  5. 5 Health check Learn to write a /healthz health endpoint. 4 min
  6. 6 Summary - Observability Combine slog and metrics to write an observability layer. 4 min
12
Advanced finalFinal
4 lessons · 32 min
  1. 1 Challenge 1 - Reflection Write a tool that produces JSON from a struct with reflect. 8 min
  2. 2 Challenge 2 - Microservice Write a service with HTTP API + database + Docker. 8 min
  3. 3 Challenge 3 - Performance Write an analysis finding a bottleneck with benchmark and pprof. 8 min
  4. 4 Challenge 4 - Database Write safe data with transaction and prepared statement. 8 min

Go internals: scheduler, GC, compiler, runtime, WASM, embedded and performance tuning.

1
Scheduler
6 lessons · 24 min
  1. 1 The G-M-P model Learn the goroutine, machine and processor trio. 4 min
  2. 2 Goroutine lifecycle Learn the running, waiting and dead states of a goroutine. 4 min
  3. 3 Work stealing Learn the work-stealing mechanism of idle processors. 4 min
  4. 4 Preemption Learn how the Go scheduler forcibly suspends goroutines. 4 min
  5. 5 Syscalls and scheduler Learn how M is managed during a syscall. 4 min
  6. 6 Summary - Scheduler Combine scheduler mechanisms to write an analysis. 4 min
2
Garbage collector
6 lessons · 24 min
  1. 1 What is GC? Learn the main goal of the garbage collector. 4 min
  2. 2 Tri-color marking Learn the white, gray, black marking algorithm. 4 min
  3. 3 Concurrent GC Learn how GC runs concurrently with the application. 4 min
  4. 4 GOGC and GOMEMLIMIT Learn the GOGC and GOMEMLIMIT environment variables. 4 min
  5. 5 GC and memory Learn the heap vs stack split and escape analysis. 4 min
  6. 6 Summary - GC Combine tri-color and GOGC to write a memory analysis. 4 min
3
Compiler
6 lessons · 24 min
  1. 1 The Go compiler Learn the phases of the Go compiler. 4 min
  2. 2 SSA Learn the Static Single Assignment intermediate representation. 4 min
  3. 3 Escape analysis Learn how the compiler decides stack vs heap. 4 min
  4. 4 Inlining Learn how the compiler inlines functions. 4 min
  5. 5 Compiler directives Learn directives like //go:nosplit. 4 min
  6. 6 Summary - Compiler Combine SSA, escape and inline to write a compilation analysis. 4 min
4
Runtime
6 lessons · 24 min
  1. 1 The runtime package Learn the basic functions of the runtime package. 4 min
  2. 2 GOMAXPROCS Learn to set the processor count with GOMAXPROCS. 4 min
  3. 3 runtime.Gosched Learn to voluntarily yield a goroutine with Gosched. 4 min
  4. 4 runtime.Stack Learn to get a goroutine's stack trace with Stack. 4 min
  5. 5 runtime.Goexit Learn to cleanly end a goroutine with Goexit. 4 min
  6. 6 Summary - Runtime Combine GOMAXPROCS, Gosched and Stack to write a monitor. 4 min
5
WASM and embedded
6 lessons · 24 min
  1. 1 WebAssembly Learn Go's WASM target. 4 min
  2. 2 GOOS=js Learn to compile with GOOS=js GOARCH=wasm. 4 min
  3. 3 WASM and DOM Learn to access the DOM with the js package. 4 min
  4. 4 Embedded Go Learn Go's use in embedded systems. 4 min
  5. 5 TinyGo Learn the TinyGo alternative compiler. 4 min
  6. 6 Summary - WASM and embedded Combine WASM and TinyGo to write a platform analysis. 4 min
6
Expert finalFinal
4 lessons · 32 min
  1. 1 Challenge 1 - Scheduler Write a monitoring tool that inspects goroutine behavior. 8 min
  2. 2 Challenge 2 - Performance Write a performance analysis that inspects GC and allocs. 8 min
  3. 3 Challenge 3 - Compiler Write a tool that inspects escape and inline decisions. 8 min
  4. 4 Challenge 4 - Production runtime Write a service with GOMAXPROCS and memory limit set. 8 min

Lessons are free, an account keeps your progress

You do not have to sign up. If you do, you continue where you left off and never lose your work.

  • Progress saved on every device
  • Earn XP and badges
  • Keep your daily streak
  • Get a certificate when you finish
create a free account

Frequently asked questions

Are the Go lessons free?

Yes. All 272 lessons of the Go course are free and you can start without an account.

Do I need any prior knowledge?

No. The beginner level starts from zero; a browser is all you need. If you already know the basics, start at a higher level.

How long does the course take?

Lessons take 2–8 minutes. The whole course is about 20 hours; with 15–20 minutes a day you can finish in a few months.

Do I get a certificate?

Yes. When you complete the course with a free account, a verifiable certificate is issued in your name.

Will I lose my progress without an account?

Without an account your progress is kept only in your current browser. When you create a free account it is moved to your account.

Next step Docker & Kubernetes

Deploy modern applications with Docker containers and Kubernetes orchestration. Containers, pods, deployments, services and Helm.