Skip to content

Glossary: Coding Interviews in Go

defer

Also written: defer file.Close()

A Go keyword that schedules a call to run when the surrounding function returns. `defer file.Close()` makes sure the file is closed.

Where the book teaches it

Related terms

encoding/csv