The go get tool
The go get
tool allows you to download and use different libraries. While Go comes with a wide range of packages by default, it is dwarfed by the number of third-party packages that are available. These provide extra functionality that you can use in your code to enhance it. However, for your code to make use of these packages, you need to have them on your computer so that the compiler can include them when compiling your code. To download these packages, you can use the go
get
tool.
Exercise 20.08 – implementing the go get tool
In this exercise, you will learn how to download a third-party package using go get
. Let’s get started: