Skip to content

Glossary: Go Basics

Unused variables and imports

Also written: declared and not used, imported and not used

Go refuses to compile a program that imports a package or declares a variable and never uses it, so leftovers and typos get caught.

Where the book teaches it

Related terms

import