Skip to content

Glossary: Go Basics

os.Args and os.Exit

Also written: os.Args, os.Exit

`os.Args` holds the command-line arguments as a slice of strings, and `os.Exit(code)` ends the program immediately with an exit code.

Where the book teaches it