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 ...
Get Go Programming - From Beginner to Professional - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.