liveBook · Manning

Go module

As explained in Go in Practice, Second Edition

A Go module is a versioned collection of Go packages described by a go.mod file and its dependency requirements.

A Go module is a versioned collection of Go packages described by a go.mod file and its dependency requirements. Go mod provides package and dependency management within the Go toolchain, improving programmer productivity and compile-time efficiency. section 1.2.4

Modules can supply local packages or external packages identified by URLs. Go's import system uses the package name as a prefix, while standard-library and nonstandard packages can be grouped in an import block. section 1.2.4

Fetching module dependencies

Use `go get ./...` to retrieve dependencies across the packages in a module.

How Go in Practice, Second Edition covers it

How deep it goes
Explains the productivity and compile-time rationale, but does not detail go.mod syntax or version-selection internals.
Examples
Uses standard-library imports, an external URL import, and `go get ./...`.
What it assumes
Assumes basic Go package and import usage while introducing external package handling through the toolchain.
What you can do after
Operate/configure dependencies with Go's integrated module tooling.
How it connects
Connects packages, imports, dependency management, and the compiler.

Also explained in

Compare how 4 books explain go module →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Go in Practice, Second Edition. The section links point to the parts of the book it draws on.