Answer the question
In order to leave comments, you need to log in
How to switch to another version of go?
Hello.
There is a linux server
On it the application on go is spinning.
The current version of go is 1.3.
Go is installed globally on the system.
I want to upgrade to version 1.6
But...
If the new version doesn't work for some reason, I want to QUICKLY ROLL BACK to the previous version.
I downloaded the archive with the latest version of go and tried to somehow start from it by conjuring with the GOROOT variable, but all the time I came across that the application could not import packages.
Something is wrong with the paths. What is the best way to migrate to the new version of go?
Answer the question
In order to leave comments, you need to log in
you have a jquery plugin connected before jquery itself,
swap the first 2 script tags
Why do you need go on the server? Deploy there already assembled binaries and there are no problems.
Build the applicuhi binary on go 1.3 and on go 1.6. If it doesn't work with 1.6, just run the old binary with 1.3.
If "to try" then it is enough to kill the global variables GOROOT and GOPATH.
Therefore, "to try" you can run all commands like this $GOROOT/bin/go version
or kill the global PATH variable by adding $GOROOT/bin there.
Example:
export GOROOT=$HOME/lab/go/go
export GOPATH=$HOME/lab/go/gopath
export PATH=$GOROOT/bin:$GOPATH/bin:$PATH
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question