Powerful Command-Line Applications in Go
by Ricardo Gerardi
Published in
3 min readMar 23, 2022
TOC | Early Praise for Powerful Command-Line Applications in Go 👉
Table of Contents
1. Your First Command-Line Program in Go
- Building the Basic Word Counter
- Testing the Basic Word Counter
- Adding Command-Line Flags
- Compiling Your Tool for Different Platforms
- Exercises
- Wrapping Up
2. Interacting with Your Users
- Organizing Your Code
- Defining the To-Do API
- Creating the Initial To-Do Command-Line Tool
- Testing the Initial CLI Implementation
- Handling Multiple Command-Line Options
- Display Command-Line Tool Usage
- Improving the List Output Format
- Increasing Flexibility with Environment Variables
- Capturing Input from STDIN
- Exercises
- Wrapping Up