Go Programming
Go Programming
A simple, statically-typed, compiled language built for concurrency and fast builds -- from syntax fundamentals through goroutines, channels, and testing.
Who it's for
Learners with some prior programming experience (in any language) who want a fast, practical introduction to Go for backend services, CLIs, or cloud tooling.
What you'll be able to do
- Read and predict the behavior of real Go programs covering variables, control flow, functions, and Go's basic collection types
- Explain Go's distinctive features: multiple return values, implicit interface satisfaction, and the (result, error) idiom
- Describe how goroutines and channels provide safe concurrency, and write a basic Go test using the standard `testing` package
Not started — 12 lessons, no account required.
Start this coursePractice this course →Add to a study plan →Interview questions →
Go Fundamentals
The toolchain, variables and types, and control flow.
- 15 min
Introduction to Go and the Toolchain
What Go is, why it exists, and the shape of a minimal Go program.
- 18 min
Variables, Types, and Constants
Declaring variables with `var` and `:=`, Go's basic types, and constants.
- 18 min
Control Flow: if, for, and switch
Go's single looping construct, condition-only if statements, and switch.
Functions & Collections
Multiple return values, slices, and maps.
- 18 min
Functions and Multiple Return Values
Declaring functions, and Go's distinctive support for returning more than one value.
- 20 min
Arrays and Slices
Go's fixed-size arrays, and the far more commonly used, resizable slice.
- 18 min
Maps
Go's built-in hash map type, and the comma-ok idiom for checking key existence.
Structs, Interfaces & Errors
Custom types with methods, implicit interfaces, and idiomatic error handling.
- 20 min
Structs and Methods
Defining custom types with struct, and attaching behavior with methods and receivers.
- 20 min
Interfaces
How Go's implicit, structural interfaces differ from interfaces in most other languages.
- 18 min
Error Handling
Go's explicit `if err != nil` idiom, and why Go has no exceptions for ordinary errors.
Concurrency & Project Structure
Goroutines and channels, packages and visibility, and testing with go test.
- 25 min
Goroutines and Channels
Go's lightweight concurrency primitives, and how channels coordinate them safely.
- 15 min
Packages and Exported Identifiers
How Go organizes code into packages, and its capitalization-based visibility rule.
- 18 min
Testing with go test
Writing a Go test file and reading `go test` output.