If you're planning to contribute - Please read further,
-
Read Contribution Guidelines before contributing to this repository! Make sure to add any new go code into
src
directory. -
Read GitHub Code Of Conduct guidelinesbefore contributing to this repository!
-
Feel free to pick up any of the open Issues or create new issue using the template!
Following instructions are verfied setup of Golang on Ubuntu 16.04 version
- Install Golang
- Setup Go development environment
- Verify the installation
- Go to src path and start development
- Bibliography
- Get the OS specific installer from here
- Run the command as
root
user orsudo
- Extract go executable in
/usr/local
directory - For Ubuntu 16.04 version
cd /usr/local/
wget https://dl.google.com/go/go1.14.1.linux-amd64.tar.gz
tar -xvzf go1.14.1.linux-amd64.tar.gz
rm go1.14.1.linux-amd64.tar.gz
or
cd /tmp
wget https://dl.google.com/go/go1.14.1.linux-amd64.tar.gz
sudo tar -xvzf go1.14.1.linux-amd64.tar.gz -C /usr/local
- Create directories for development
mkdir -p $HOME/go/{bin,src,pkg}
Where,
bin - directory to hold the go source executables
src - source directory in which all the source modules will be coded
pkg - directory to hold the dependency import packages
- Add path to environment permanently by adding in profile
export "PATH=$PATH:/usr/local/go/bin"
export "GOPATH=$HOME/go"
export "GOBIN=$GOPATH/bin"
- Execute .profile file to make effect of Env variable updates
source ~/.profile
go help
go env
cd $HOME/go/src
mkdir <new_go_module_name>