URL : https://thaliyola.herokuapp.com/
How To Install Go 1.12 on Ubuntu and host in heroku
Go is an open source programming language developed by a team at Google.
-
Step 1
sudo apt-get update
-
Step 2
download the Go language binary archive file
wget https://dl.google.com/go/go1.12.7.linux-amd64.tar.gz
-
Step 3
extract the downloaded archive and install it
sudo tar -xvf go1.12.7.linux-amd64.tar.gz
sudo mv go /usr/local
-
Step 4 : Setup Go Environment
Now you need to setup Go language environment variables for your project.
Commonly you need to set 3 environment variables as GOROOT, GOPATH and PATH.
GOROOT is the location where Go package is installed on your system.
export GOROOT=/usr/local/go
GOPATH is the location of your work directory. For example my project directory is ~/Developer/thaliyola
export GOPATH=$HOME/Developer/thaliyola<br>
Now set the PATH variable to access go binary system wide.
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH<br>
All the above environment will be set for your current session only. To make it permanent add above commands in ~/.profile file.
- Step 5 โ Verify Installation
At this step, you have successfully installed and configured go language on your system. First, use the following command to check the Go version.
go version
go version go1.12.7 linux/amd64
Now also verify all configured environment variables using following command.
Link : heroku.com and create account.
https://github.com/heroku/heroku-buildpack-go
https://devcenter.heroku.com/articles/getting-started-with-go
- heroku log
jithu@jithu-PC-LL750CS6R:~/developer$ heroku logs --tail --app thaliyola