This consists of all the codes in the golang tutorial -> https://go.dev/doc/tutorial/
-
Things that I have learnt
- How to create a go file
- Step 1: Create a folder
mkdir <folderName> - Step 2: Go inside that folder & run cmd as
go mod init <domain>/<packageName> - Step 3: Create a go module by creating a new file
[fileName].go - Step 4: Write some basic go code in it and to run it type
go run .orgo run <fileName>
- Step 1: Create a folder
- How to create a go file
-
Important go commands
go mod initgo mod editgo rungo testgo buildgo install
-
Continued...