How to Use This Book

Powerful Command-Line Applications in Go — by Ricardo Gerardi (6 / 127)

The Pragmatic Programmers
The Pragmatic Programmers

--

👈 What’s in This Book | TOC | About the Example Code 👉

To best follow this book and test the code examples, you need Go 1.13 or higher installed on your machine. At the time of writing this book, the current version of Go is 1.16. You can find more information on installing Go in the official documentation.[6]

The code examples in the book use Go modules to manage package dependencies. For details, consult Go Modules. By using Go modules, you’re no longer required to code under the $GOPATH directory. Modules have been available since Go 1.11 and enabled by default since 1.13.

Make sure the Go binary go is in your $PATH variable so you can execute Go commands from anywhere without prefixing the absolute path. For example, to run tests, you type go test, and to build programs, you run go build. Some examples also execute the binary version of your tools. These are typically installed in the directory $HOME/go/bin. We expect that this directory exists and is included in your $PATH variable.

You’ll also need a working Internet connection to download the source code and the external libraries required by some examples. Finally, you’ll need a text editor to write your programs and access to a command shell to test and run them. We recommend using the Bash shell as most of the examples presented in the book use it.

--

--

The Pragmatic Programmers
The Pragmatic Programmers

We create timely, practical books and learning resources on classic and cutting-edge topics to help you practice your craft and accelerate your career.