Repo for the author to play with golang for the first time, everything in here is based on the material available in https://golang-for-python-programmers.readthedocs.io/en/latest/index.html
sudo apt install gcc libc6-dev mercurial
go version
https://go.dev/doc/tutorial/getting-started
go install golang.org/x/tools/cmd/godoc@latest
export GOPATH=~/go
export PATH=$PATH:$GOPATH/bin
Create a directory for your Go project inside the src directory:
mkdir -p ~/go/src/github.com/yourusername/yourproject
In your repo root directory, make a new file called go.mod
(this file manages
the project dependencies). In the repo folter, run:
go mod init example.com/myproject
The recommended indentation is to use tabs instead of spaces.
gofmt -w <filename>.go # -w option updates the file(s) in place
e.g.: go run 01_hello.go