Command-Line Flags
Learn how to add command-line flags in the basic word count application.
Good command-line tools provide flexibility through options. The current version of the word counter tool only counts words. Let’s add the ability to also count lines by giving the user the option to decide when to switch this behavior through command-line flags. Go provides the flag package, which can be used to create and manage command-line flags.
Access this course and 1400+ top-rated courses and projects.