Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recompile all packages after upgrading Go?

Tags:

go

After I upgraded Go, how do I make sure all my packages in $GOPATH/pkg and binaries in $GOPATH/bin are recompiled using the new version ?

I would like that any upgrade errors are reported as warnings, not errors causing the operation to abort.

like image 927
chmike Avatar asked Dec 19 '17 11:12

chmike


1 Answers

Assuming you have a single GOPATH path, you can update all packages by running this:

cd $GOPATH/src go get -u -v ./...

If you have multiple GOPATHs you need to go into the src folder of each one of them and run:

go get -u -v ./...

Then run go install all

like image 125
Francisco Claude Avatar answered Nov 04 '22 10:11

Francisco Claude