Go Lessons
Type idiomatic Go code for the cloud era. Build simple, reliable, and high-performance software systems efficiently.
Hello World
Your first Go program.
Variables
Learn how to store data with variables.
Constants
Values that cannot change.
Short Declaration
Short variable declaration.
Basic Types
Basic types in Go.
Arrays
Information on Arrays.
Slices
Dynamic arrays.
Maps
Key-value pairs.
If Else
Conditional Logic.
Loops
The only loop you need.
Pointers
Understanding pointers.
Structs
Collections of fields.
Methods
Functions on types.
Interfaces
Polymorphism in Go.
Goroutines
Lightweight threads.
Channels
Connecting goroutines.
Defer
Cleanup actions.
Select
Waiting on multiple channel operations.
Errors
Handling errors explicitely.
Init
Package initialization.
Mutex
Mutual exclusion.
Waitgroups
Waiting for goroutines.
Atomic
Thread-safe counters.
Context
Managing deadlines and cancellation.
Testing
Built-in testing framework.
Composition
Embedding structs.
Generics
Type parameters.
Reflection
Inspecting types at runtime.
Unsafe
Bypassing type safety.
Cgo
Calling C code.