December 2017
Intermediate to advanced
316 pages
6h 58m
English
There is a difference between command-line arguments and flags. The following diagram clearly specifies the distinction between them:

Suppose that we have a command-line app called storeMarks for saving the marks of a student. It has a flag (called save) to specify whether details should be pushed to DB or not. The arguments that are given are the name and actual marks of the student. We already saw how to collect the flag values in the program. In this section, we will see how to collect program arguments in an expressive way.
For collecting arguments, we use the c.Args function, where c is the cli ...