Book description
Evolve the humble CLI using Go and unleash the next generation of powerful, flexible, and empathy-driven interfaces Purchase of the print or Kindle book includes a free PDF eBook
Key Features
- Discover how Go enables the development of elegant and intuitive CLIs
- Explore a range of CLI development aspects and pick up a vast array of best practices
- Create engaging and user-friendly interfaces and learn how to distribute them
Book Description
Although graphical user interfaces (GUIs) are intuitive and user-friendly, nothing beats a command-line interface (CLI) when it comes to productivity. Many organizations settle for a GUI without searching for alternatives that offer better accessibility and functionality. If this describes your organization, then pick up this book and get them to rethink that decision.
Building Modern CLI Applications in Go will help you achieve an interface that rivals a GUI in elegance yet surpasses it in high-performance execution. Through its practical, step-by-step approach, you’ll learn everything you need to harness the power and simplicity of the Go language to build CLI applications that revolutionize the way you work.
After a primer on CLI standards and Go, you’ll be launched into tool design and proper framework use for true development proficiency. The book then moves on to all things CLI, helping you master everything from arguments and flags to errors and API calls. Later, you’ll dive into the nuances of empathic development so that you can ensure the best UX possible, before you finish up with build tags, cross-compilation, and container-based distribution.
By the end of this UX book, you’ll be fully equipped to take the performance and flexibility of your organization’s applications to the next level.
What you will learn
- Master the Go code structure, testing, and other essentials
- Add a colorful dashboard to your CLI using engaging ASCII banners
- Use Cobra, Viper, and other frameworks to give your CLI an edge
- Handle inputs, API commands, errors, and timeouts like a pro
- Target builds for specific platforms the right way using build tags
- Build with empathy, using easy bug submission and traceback
- Containerize, distribute, and publish your CLIs quickly and easily
Who this book is for
This book is for beginner- and intermediate-level Golang developers who take an interest in developing CLIs and enjoy learning by doing. You’ll need an understanding of basic Golang programming concepts, but will require no prior knowledge of CLI design and development. This book helps you join a community of CLI developers and distribute within the popular Homebrew package management tool.
Table of contents
- Building Modern CLI Applications in Go
- Foreword
- Contributors
- About the author
- About the reviewers
- Preface
- Part 1: Getting Started with a Solid Foundation
- Chapter 1: Understanding CLI Standards
- Chapter 2: Structuring Go Code for CLI Applications
- Chapter 3: Building an Audio Metadata CLI
- Chapter 4: Popular Frameworks for Building CLIs
- Part 2: The Ins and Outs of a CLI
- Chapter 5: Defining the Command-Line Process
- Chapter 6: Calling External Processes and Handling Errors and Timeouts
- Chapter 7: Developing for Different Platforms
- Part 3: Interactivity and Empathic Driven Design
- Chapter 8: Building for Humans versus Machines
- Chapter 9: The Empathic Side of Development
- Chapter 10: Interactivity with Prompts and Terminal Dashboards
- Part 4: Building and Distributing for Different Platforms
- Chapter 11: Custom Builds and Testing CLI Commands
- Chapter 12: Cross-Compilation across Different Platforms
- Chapter 13: Using Containers for Distribution
- Chapter 14: Publishing Your Go Binary as a Homebrew Formula with GoReleaser
- Index
- Other Books You May Enjoy
Product information
- Title: Building Modern CLI Applications in Go
- Author(s):
- Release date: March 2023
- Publisher(s): Packt Publishing
- ISBN: 9781804611654
You might also like
book
Powerful Command-Line Applications in Go
Whether you want to automate tasks, analyze data, parse logs, talk to network services, or address …
video
Up and Running with Concurrency in Go (Golang)
According to the most recent developer surveys, Go(lang) is one of the world’s most desired and …
book
Event-Driven Architecture in Golang
Begin building event-driven microservices, including patterns to handle data consistency and resiliency Key Features Explore the …
video
Learn GO by Building Three Simple Golang Projects
According to many industry experts, Golang is the most important skill to learn in 2022 as …