Stage 1 · Code
Packages, Modules & Concurrency Intro
Standard Library Tour
A working tour of the Go packages you will reach for every day — strings, time, os, io, net/http, and encoding/json.
strings and strconv
The strings package provides searching, splitting, trimming, and replacing on string values. strconv converts between strings and numeric types.
time
The time package handles instants, durations, formatting, and parsing. time.Now() returns the current time; time.Duration represents elapsed time. Always use time.Duration for intervals — not raw integers.
os and io
os interacts with the operating system: environment variables, files, arguments, and signals. io provides the core reader and writer interfaces and helpers for combining them.
net/http
net/http is a production-ready HTTP client and server in the standard library. It handles connection pooling, TLS, redirects, and request routing out of the box.
encoding/json
encoding/json converts between Go values and JSON. Struct field tags control the JSON key names. json.Marshal encodes; json.Unmarshal (or json.NewDecoder) decodes.
Mark this lesson complete to store local progress and unlock a cleaner resume path the next time you visit.