Hello World
Project Initialization
Start by creating a new project directory and initializing a Go module:
mkdir hello
cd hello
go mod init hello
mkdir hello: Create a new directory named hello.
cd hello: Change into the hello directory.
go mod init hello: Initialize a new Go module named hello. This creates a go.mod file that defines the module's name and its dependencies.
- Note: Visual Studio Code opens the current directory as a workspace, so you can open the
hello directory in VS Code.