Reading Arguments from the Command-Line

This lesson explains two packages of Go that let us read arguments from the command line.

With the os package

The package os also has a variable os.Args of type slice of strings that can be used for elementary command-line argument processing, which is reading arguments that are given on the command-line when the program is started. Look at the following greetings-program:

Get hands-on with 1400+ tech skills courses.