Go Structs and Methods: Value vs Pointer Receivers
A clear guide to Go structs and methods: literal forms, defining methods, choosing value vs pointer receivers, and using embedding for composition.
55 posts · page 2 of 2
A clear guide to Go structs and methods: literal forms, defining methods, choosing value vs pointer receivers, and using embedding for composition.
Go's control flow in full — if with an init statement, the only loop (for) in all four forms, switch without break, type switches, and how defer fits in.
A complete guide to Go functions — declarations, parameters, multiple and named returns, the error idiom that defines Go, variadic parameters, and functions as values.
A complete setup guide for Go on macOS, Linux, and Windows — install the toolchain, verify with go version, create a module, and run a real program with go run and go build.
A practical guide to Go's two everyday collections — slices and maps. Covers arrays vs slices, make and append, len and cap, the shared-backing-array gotcha, and the comma-ok idiom.
A practical tour of Go's variable declarations and basic types — var vs :=, int and float64, strings, bool, byte and rune, zero values, type conversion, and constants.
A practical introduction to Go — where it came from, what it was designed to fix, the kinds of systems it excels at, and the kinds it doesn't. With your first Go program.