Create an empty folder named hello, enter it, and initialize the project with one command:
Command
go mod init example.com/helloLine-by-line explanation
gostarts the Go toolchain.modselects module tools.initmeans initialize a new module.example.com/hellois the module name used for learning.
Expected output
go: creating new go.mod: module example.com/helloGo creates a small text file named go.mod in the current directory.
For a published project, the module name usually matches its repository address, such as github.com/name/project. For private practice, example.com/hello is safe and clear.