Defer, Panic and Recover
Run cleanup code with defer and turn a panic back into an error with recover.
Lektion ansehen →defer, panic und recover, Closures, JSON, Sortieren sowie Runes und Bytes im Go-Alltag.
Go online ausprobierenRun cleanup code with defer and turn a panic back into an error with recover.
Lektion ansehen →Store functions in variables, pass them around and capture variables.
Lektion ansehen →Convert structs to JSON and back with encoding/json and struct tags.
Lektion ansehen →Sort numbers, strings and structs with the sort and slices packages.
Lektion ansehen →Handle Unicode text correctly and build long strings efficiently.
Lektion ansehen →