typeover
curriculum

Curriculum Errors & packaging Modules & go.mod exercise 3 · mcq

Modules & go.mod

Pick the command that adds a third-party package as a dependency of your module and updates go.mod + go.sum. TypeScript: npm install <pkg> mutates package.json + package-lock.json. Go's analog has a more compact spelling.

TypeScript reference
Pick the idiomatic Go translation

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.