chmike
chmike

Reputation: 22174

Recompile all packages after upgrading 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.

Upvotes: 9

Views: 3468

Answers (1)

Francisco Claude
Francisco Claude

Reputation: 114

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

Upvotes: 3

Related Questions