module path
The name a Go module declares in its go.mod file, which is also the prefix of every import path inside it.
In more detail
For published code the path is where the code lives, such as github.com/owner/repo, so the go command can fetch it. For private code any unique name works; the course uses course.local/probe. Choose it carefully, because renaming it changes every import.
Example
module course.local/probeRelated terms
- Go module — A tree of Go packages that is versioned and released together, described by a go.mod file at its root.
- import path — The string that identifies a package in an import line: the module path followed by the folder inside the module.
- go.mod — The text file at the root of a Go module that records its module path, the Go version it needs and the other modules it depends on.
Taught in
- Go Workspaces and Modules — Concurrent Systems Programming with Go