Learn Go (Golang) from Scratch
Learn Go from installation to a working web server: types, control flow, slices and maps, structs and interfaces, error handling, goroutines and channels.
What you will learn
- Write clear, idiomatic Go code
- Model data with structs and interfaces
- Handle errors the Go way
- Use goroutines and build a small HTTP server
Course syllabus
- Introduction to Go: Install and Hello WorldLearn what the Go programming language is, why companies use it, how to install it and how to write, run…
- Go Variables, Types and ConstantsLearn how to declare variables in Go, its basic data types, zero values, short declarations, constants and type conversion.
- Go Control Flow: if, for and switchLearn Go conditionals and loops: if with init statements, the single for loop, range, switch and defer, with examples.
- Go Functions, Slices and MapsLearn Go functions with multiple return values, variadic functions, slices, maps and how to work with collections efficiently.
- Go Structs, Methods and InterfacesLearn how Go models data with structs, adds behaviour with methods and pointer receivers, and uses interfaces for flexible design.
- Go Error HandlingLearn idiomatic Go error handling: returning errors, wrapping with fmt.Errorf, custom errors, errors.Is and errors.As, and when to use panic.
- Go Concurrency and a Tiny Web ServerLearn goroutines, channels and sync.WaitGroup, then build a small HTTP server with the net/http package that returns JSON.