Setup golang in ubuntu 16.04
Setup golang in ubuntu 16.04
Install Go 1.8
Installing 1.8 in newer versions of ubuntu is as simple as sudo apt-get install golang-1.8-go unless you are running older versions of ubuntu like 16.04. In ubuntu 16.04 you need to use longsleep/golang-backports ppa. You can run following commands to install golang 1.8:
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt-get update
sudo apt-get install golang-goIn case you are thinking why I won’t use some version manager, I tried using gvm but some bugs made it totally unusable for me. I have not tried it recently if they have fixed those nasty bugs. So for now, I am going to continue without version manager. Besides that I have not been in dire need to manage multiple versions of golang.
Setting up workspace
Golang developers like to keep all their go code in single workspace. Please refer this doc to know more about workspace practice of golang devs. You can create workspace as described there with following command:
mkdir go && cd go && mkdir bin pkg srcSetting up gopath
Add following to your .zshrc or .bashrc.
export PATH=$PATH:$(go env GOPATH)/bin
export GOPATH=$(go env GOPATH)You may need to restart your terminal to see this config in action. Please refer doc to know more about gopath.
Setting up glide
Are you used to tools such as Cargo, npm, Composer, Nuget, Pip, Maven, Bundler, or other modern package managers? If so, Glide is the comparable Go tool.
If you have been following this doc throroughly you can easily setup glide with following command:
sudo add-apt-repository ppa:masterminds/glide && sudo apt-get update
sudo apt-get install glideOn Ubuntu Zesty (17.04) the package is called golang-glide.
References:
Keep reading
How to solve Deployment Failure-`assets:precompile`
I was trying to deploy rails 6 app on ec2 server using capistrano when precompile failure lead to whole deploymentt failure. I had to uninstall cmdtest and install yarn
How to Sort an Array of Objects in JavaScript
How to Sort an Array of Objects in JavaScript
Ways to increase productivity while working from home
It could be quite challenging to work from home without serious commitment and right set of skills. Here are some effective tips that can help you.