20
Using Go Tools
Overview
This chapter will teach you how to make use of the Go toolkit so that you can improve and build your code. It will also help you build and improve your code using Go tools and create binaries using go build. Furthermore, you’ll learn how to clean up library imports using goimports, detect suspicious constructs with go vet, and identify race conditions in your code using the Go race detector.
By the end of this chapter, you will be able to run code with go run, format code with gofmt, automatically generate documentation using go doc, and download third-party packages using go get.
Technical requirements
For this chapter, you’ll require Go version 1.21 or higher. The code for this chapter can be found at https://github.com/PacktPublishing/Go-Programming-From-Beginner-to-Professional-Second-Edition-/tree/main/Chapter20 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access