Skip to content

Glossary: Go Basics

Panic

Also written: panics

A crash caused by a bug the compiler couldn't catch, such as an index out of range or dividing by zero. Treat a panic as a bug to fix, not as an error value.

Where the book teaches it

Related terms

nil pointer dereference