Curriculum Errors & packaging Modules & go.mod exercise 1 · mcq
Modules & go.mod
A Go module is a versioned collection of packages —
your project's unit of dependency tracking. Pick the
command that initialises a new module in the current
directory.
TypeScript: npm init writes package.json. Go's analog
is go mod init <module-path> writing go.mod. The module
path is usually the source URL but doesn't have to resolve.
TypeScript reference
About this theme
A module is a versioned collection of packages — your project's unit of dependency. go mod init github.com/you/yourthing produces go.mod. go get adds deps. Module paths look like URLs but don't have to resolve to anything; they're identifiers.