The difference between go get with -u and without -u parameters in golang

-u will update the existing local code package

In addition, it can use the network to update existing code packages and their dependent packages. If you have already downloaded a code package, but this code package has been updated, then you can directly use the -u flag to update the corresponding local code package at this time. If you do not add the -u flag and execute go get an existing code package, you will find that the command does not execute anything. Only if the -u flag is added, the command will execute the git pull command to pull the latest version of the latest code package, download and install it.

Guess you like

Origin blog.csdn.net/taoshihan/article/details/132519913