Part 2: The Ins and Outs of a CLI
This part focuses on the anatomy of a command-line application and the different types of inputs it can receive, such as subcommands, arguments, and flags, as well as other inputs such as stdin, signals, and control characters. It also covers various methods for processing data and how to return the result, including handling errors and timeouts when interacting with external commands or API services. The chapter also highlights Go’s cross-platform capabilities using packages such as os, time, path, and runtime.
This part has the following chapters:
- Chapter 5, Defining the Command-Line Process
- Chapter 6, Calling External Processes, Handling Errors and Timeouts
- Chapter 7, Developing for Different Platforms