Skip to content

Glossary: Data Structures and Algorithms in Go

defer

Also written: defer file.Close()

A Go keyword that schedules a call to run when the surrounding function ends. The planner uses it to close a file once reading is done.

Where the book teaches it