Building Modern CLI Applications in Go: Develop next-level CLIs to improve user experience, increase platform usage, and maximize production

Montagnino, Marian

  • 出版商: Packt Publishing
  • 出版日期: 2023-03-10
  • 售價: $1,740
  • 貴賓價: 9.5$1,653
  • 語言: 英文
  • 頁數: 406
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 1804611654
  • ISBN-13: 9781804611654
  • 相關分類: 使用者經驗 UX
  • 海外代購書籍(需單獨結帳)

買這商品的人也買了...

商品描述

Evolve the humble CLI using Go and unleash the next generation of powerful, flexible, and empathy-driven interfaces

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.

商品描述(中文翻譯)

透過使用Go語言,進化謙卑的命令列介面(CLI),並釋放出下一代強大、靈活且以共情為導向的介面。

主要特點:

• 探索Go如何實現優雅且直觀的CLI
• 探索各種CLI開發方面,並學習大量最佳實踐
• 創建引人入勝且用戶友好的介面,並學習如何分發它們

書籍描述:

儘管圖形用戶界面(GUI)直觀且用戶友好,但在提高生產力方面,沒有什麼能比得上命令列介面(CLI)。許多組織只滿足於使用GUI,而沒有尋找提供更好可訪問性和功能性的替代方案。如果您的組織符合這種情況,那麼請閱讀本書,並讓他們重新考慮這個決定。

在Go中構建現代CLI應用程序將幫助您實現一個介面,它在優雅性方面可以與GUI相媲美,但在高性能執行方面超越它。通過實用的逐步方法,您將學習使用Go語言的力量和簡潔性來構建革命性的CLI應用程序,徹底改變您的工作方式。

在介紹CLI標準和Go之後,您將進入工具設計和正確的框架使用,以實現真正的開發熟練度。然後,本書將介紹CLI的各個方面,幫助您掌握從參數和標誌到錯誤和API調用的所有內容。隨後,您將深入研究共情開發的細微差別,以確保最佳的用戶體驗,最後介紹構建標籤、跨平台編譯和基於容器的分發。

通過閱讀本書,您將完全具備將組織應用程序的性能和靈活性提升到新水平的能力。

您將學到什麼:

• 掌握Go代碼結構、測試和其他基本知識
• 使用引人入勝的ASCII橫幅為CLI添加豐富多彩的儀表板
• 使用Cobra、Viper和其他框架為CLI提供優勢
• 像專業人士一樣處理輸入、API命令、錯誤和超時
• 使用構建標籤正確地針對特定平台進行構建
• 使用簡單的錯誤提交和回溯來具備共情,進行構建
• 快速且輕鬆地將您的CLI容器化、分發和發布

本書適合對Golang開發有興趣且喜歡實踐學習的初級和中級開發人員。您需要了解基本的Golang編程概念,但不需要事先了解CLI設計和開發的知識。本書將幫助您加入CLI開發人員社區,並在流行的Homebrew軟體包管理工具中進行分發。

目錄大綱

1. Understanding CLI Standards
2. Structuring Go Code for CLI Applications
3. Design your tool and its purpose
4. Popular frameworks in Go to speed up and enhance CLI development
5. Processing Different Types of Input via Arguments and Flags
6. Calling External Processes and API commands and Handle Timeouts, and Error Handling
7. Developing for Different Platforms
8. Being Clear, Concise and Consistent with CLIs
9. Empathic Side of Development
10. Interactivity with Prompts and Terminal Dashboards
11. Customizing Go Binaries with Build Tags
12. Cross Compilation Across Different Platforms
13. Using Containers for Distribution
14. Publish your Go binary as a Homebrew Formula with GoReleaser

目錄大綱(中文翻譯)

1. 瞭解 CLI 標準
2. 結構化 Go 程式碼以用於 CLI 應用程式
3. 設計您的工具及其目的
4. 在 Go 中使用流行的框架以加速和增強 CLI 開發
5. 通過參數和標誌處理不同類型的輸入
6. 呼叫外部進程和 API 命令,處理超時和錯誤處理
7. 開發適用於不同平台的應用程式
8. 在 CLI 中保持清晰、簡潔和一致
9. 開發的共感面
10. 通過提示和終端機儀表板實現互動性
11. 使用構建標籤自定義 Go 可執行文件
12. 在不同平台上進行交叉編譯
13. 使用容器進行分發
14. 使用 GoReleaser 將您的 Go 可執行文件發布為 Homebrew 公式