Powerful Command-Line Applications in Go (PragProg)

Go is a modern programming language that combines the reliability of compiled languages with the ease of use and flexibility of dynamic typed languages. With Go, you can develop cross-platform command-line tools that are fast and reliable. Work through practical examples to develop elegant and efficient tools by applying Go’s rich standard library, its built-in support for concurrency, and its expressive syntax. Use Go’s integrated testing capabilities to automatically test your tools, ensuring they work reliably even across code refactoring.

Ricardo Gerardi @rgerardi

edited by Brian P. Hogan @bphogan

Go is a modern programming language that combines the reliability of compiled languages with the ease of use and flexibility of dynamic typed languages. With Go, you can develop cross-platform command-line tools that are fast and reliable. Work through practical examples to develop elegant and efficient tools by applying Go’s rich standard library, its built-in support for concurrency, and its expressive syntax. Use Go’s integrated testing capabilities to automatically test your tools, ensuring they work reliably even across code refactoring.

Develop CLI tools that interact with your users by using common input/output patterns, including environment variables and flags. Handle files to read or persist data, and manipulate paths consistently in cross-platform scenarios. Control processes and handle signals, and use a benchmark driven approach and Go’s concurrency primitives to create tools that perform well. Use powerful external libraries such as Cobra to create modern and flexible tools that handle subcommands, and develop tools that interact with databases, APIs, and network services. Finally, leverage what you learned by tackling additional challenges at the end of each chapter.


  • Full details: Search
  • View this book’s portal and details on how to post errata and suggestions here.

Don’t forget you can get 35% off with your Devtalk discount! Just use the coupon code “devtalk.com" at checkout :+1:

4 Likes