Skip to content

Glossary: Go Basics

Exit code

Also written: exit status, os.Exit

A number a program ends with, telling the terminal whether it succeeded: 0 for success and anything else for failure. `os.Exit(1)` ends the program with code 1.

Where the book teaches it

Related terms

os.Args and os.Exit