positional argument

A command-line argument identified by its position rather than by a flag name, such as the host names after the options.

In more detail

Use positional arguments for the things a command acts on, and options for how it acts. A command should print its usage message when a required one is missing.

Examples

hosts := flag.Args()
Go: flag.Args() returns what is left after flag.Parse()

Related terms

Taught in

References