What is the difference between `go get` and `go install` in Go?
Hello! I recently started learning Go and am trying to understand dependency management and project building. I often see the commands `go get` and `go install` being used, but I don't fully understand the difference between them.
For example, I want to install the `hey` utility for load testing. The documentation says: `go get -u github.com/rakyll/hey` and `go install github.com/rakyll/hey@latest`. Both commands seem to download and install the program, but I noticed that after `go get` the binary appeared in `$GOPATH/bin`, and after `go install` it also went there, but at the same time a `go.sum` file appeared in the project folder.
I also tried using `go get` to add a library to my project: `go get github.com/gin-gonic/gin`. After that, a line with the dependency appeared in `go.mod`, and hashes appeared in `go.sum`.