My own golang playground
-
Uninstall existing version:
sudo rm -rf /usr/local/go
. -
Download TGZ from https://go.dev/dl/.
-
Extract new version:
sudo tar -C /usr/local -xzf /home/carlos/Downloads/go1.22.1.linux-amd64.tar.gz
. -
Make sure your
PATH
contains/usr/local/go/bin
and/home/carlos/go
:echo $PATH | grep "/usr/local/go/bin"
-
Create a folder in your repository, like
mkdir project
. -
Once inside that directory, run
go mod init github.com/lantero/go-lessons/project
.