Defer, Panic and Recover
Run cleanup code with defer and turn a panic back into an error with recover.
View lesson →Use defer, panic and recover, closures, JSON, sorting, and runes and bytes in everyday Go programs.
Try Go onlineRun cleanup code with defer and turn a panic back into an error with recover.
View lesson →Store functions in variables, pass them around and capture variables.
View lesson →Convert structs to JSON and back with encoding/json and struct tags.
View lesson →Handle Unicode text correctly and build long strings efficiently.
View lesson →