Go for DevOps
You're viewing a free preview. Sign in free to read every script.
Why this exists Go has no classes and no inheritance: it has structs, methods and composition. Once a program grows past a few functions, two questions decide whether it behaves: does this function change my data or a…
Go for DevOps: Pointers, Methods, Value versus Pointer Receivers, Embedding and Functional Options
When a function can change your data and when it cannot: pass by value and pointers, value versus pointer receivers, the interface error they cause, composition by embedding, constructors with functional options, making zero values useful, nil pointer panics, and the vet check for copied locks.
Sign in free to read this script, along with the rest of the library.
Sign in free