A go.mod file looks something like this:
module myproject
go 1.21
The module line declares your module's name. The go line specifies the minimum Go version required. When you import external packages, Go adds them to this file automatically. You'll also see a go.sum file that contains checksums for verification.