← Languages

Go

Full course · 21 lessons

Go is a statically typed, compiled language designed at Google for building simple, reliable, and efficient software at scale. It excels at backend services, microservices, APIs, and concurrent systems.

Knowledge Course
01

Getting Started with Go

Install Go, set up GOPATH, understand workspaces, write Hello World, and explore the Go toolchain.

45 min→
02

Variables, Constants, and Basic Types

Variable declarations, zero values, constants, iota, basic types, and type conversions.

60 min→
03

Control Flow: if, for, switch

For loops, if with statement, switch expressions, type switches, and defer/panic/recover.

60 min→
04

Functions and Multiple Return Values

Function declarations, multiple return values, named returns, variadic functions, closures, and function values.

60 min→
05

Arrays, Slices, and Range

Array declarations, slice mechanics (make, append, copy), slice internals, and the range keyword.

60 min→
06

Maps and Structs

Map creation and operations, structs, struct embedding, tags, and JSON serialization.

60 min→
07

Methods and Interfaces

Method declarations, pointer vs value receivers, interface types, interface satisfaction, and the empty interface.

75 min→
08

Pointers and Memory

Pointer types, new function, stack vs heap, escape analysis, and unsafe pointer operations.

60 min→
09

Errors, Panic, and Recover

The error interface, custom errors, error wrapping, panic/recover, and error handling patterns.

60 min→
10

Packages and Modules

Package declarations, import paths, go modules, versioning, and publishing packages.

60 min→
11

Goroutines and Channels

Launch goroutines with go keyword, create and use channels for communication, use select for multiplexing, understand goroutine scheduling and leaks.

60 min→
12

sync Package: Mutex, WaitGroup, Once, Pool

Use sync.Mutex and RWMutex for thread safety, sync.WaitGroup for goroutine coordination, sync.Once for one-time initialization, sync.Pool for object reuse.

45 min→
13

Context: Cancellation and Timeouts

Create contexts with Background, TODO, WithCancel, implement timeouts and deadlines with WithTimeout, pass request-scoped values through context.

45 min→
14

Testing: testing Package and Table-Driven Tests

Write unit tests with testing.T, use table-driven tests, write benchmarks with testing.B, use go test flags and coverage.

45 min→
15

I/O: Readers, Writers, and File Operations

Use io.Reader and io.Writer interfaces, work with files via os package, use bufio for buffered I/O, use io.Copy, io.MultiReader, io.TeeReader.

45 min→
16

JSON, Encoding, and Serialization

Marshal and unmarshal JSON with encoding/json, use struct tags for JSON field mapping, write custom JSON marshalers/unmarshalers.

45 min→
17

HTTP Server, Client, and Middleware

Build HTTP servers with net/http, handle requests with ServeMux routers, make HTTP requests with http.Client, write middleware pattern.

60 min→
18

Reflection and Generics (Go 1.18+)

Use reflect package for runtime type inspection, write generic functions with type parameters, use constraints for type bounds.

45 min→
19

Modules, Packages, and Dependency Management

Create and publish Go modules, manage versions with go mod and semantic versioning, use workspaces for multi-module projects.

45 min→
20

Building CLI Tools with flag and cobra

Use flag package for command-line flags, use cobra for complex CLI applications, handle os.Args and subcommands.

45 min→
21

Low-Level Programming, unsafe, and CGo

Use the unsafe package for low-level memory manipulation, call C code with cgo, understand Go's memory model and GC.

75 min→
Curated Resources